> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/norbix-cloud/code.md).

# Code

<figure><img src="/files/GFpNWs1ULAcaDNtP8nJL" alt=""><figcaption><p>The Code module — serverless functions and integrations.</p></figcaption></figure>

Norbix **Code** service allows you to add your own custom functions or Norbix provided functions which can later be used in various triggers, scheduled tasks, or called through [API](https://docs.norbix.ai/sdks).

To start using Code [API](https://docs.norbix.ai/sdks) you first need to enable code service in your Norbix dashboard.

Features included in code service:

1. Providers - the ability to add your own functions from external providers.
2. Functions - executing your own custom pieces of code.
3. Norbix functions - using Norbix implemented functions.

## Using SDK

If you decide to use one of our provided SDK, the following code shows how to initialize code service.

{% tabs %}
{% tab title=".NET" %}

```csharp
var projectId = Guid.Parse("{YOUR_PROJECT_ID}");
var apiKey = "{YOUR_SECRET_KEY}";

var client = new NorbixClient(apiKey, projectId);
var codeService = new NorbixCodeService(client);
```

{% endtab %}

{% tab title="Node" %}

```
```

{% endtab %}

{% tab title="PHP" %}

```php
use Norbix\NorbixClient;
use Norbix\NorbixCode;

class NorbixService
{
    protected NorbixCode $norbixCode;

    public function __construct()
    {
        $secretKey = '{YOUR_SECRET_KEY}';
        $projectId = '{YOUR_PROJECT_ID}';

        $client = new NorbixClient($secretKey, $projectId);
        $this->norbixCode = new NorbixAuth($client);
    }

}
```

{% endtab %}
{% endtabs %}

## Example

The following are examples of code SDK using different languages and frameworks.

{% tabs %}
{% tab title=".NET" %}

```csharp
using System;
using Norbix.Client;
using Norbix.Code.Services;
using Isidos.Norbix.ServiceContracts;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            // 1. Get your Project ID and Secret Key
            var projectId = Guid.Parse("{YOUR_PROJECT_ID}");
            var apiKey = "{YOUR_SECRET_KEY}";

            // 2. Create a general client for API calls
            var client = new NorbixClient(apiKey, projectId);
            
            // 3. Create a service object
            var codeService = new NorbixCodeService(client);

            // 4. Call an API method
            codeService.ExecuteFunction(new ExecuteFunctionRequest
            {
                Id = Guid.Parse("{YOUR_FUNCTION_ID}")
            });
        }
    }
}
```

{% endtab %}

{% tab title="Node" %}

```
```

{% endtab %}

{% tab title="PHP" %}

```php
use Norbix\NorbixClient;
use Norbix\NorbixCode;

class NorbixService
{
    protected NorbixCode $norbixCode;

    public function __construct()
    {
        $secretKey = '{YOUR_SECRET_KEY}';
        $projectId = '{YOUR_PROJECT_ID}';

        $client = new NorbixClient($secretKey, $projectId);
        $this->norbixCode = new NorbixAuth($client);
    }

    public function executeFunction()
    {
        $responseData = $this->norbixCode->executeFunction([
            'id' => '{YOUR_FUNCTION_ID}',
        ]);
    }
}
```

{% endtab %}
{% endtabs %}

## Working with Code Service

The following links explore the usage of code service:

{% content-ref url="/pages/-LxLDpXXbEzouv\_aZxkt" %}
[Integrations](/norbix-cloud/code/integrations.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LwUEOAQwYrkmmiX3Wc-" %}
[Functions](/norbix-cloud/code/functions.md)
{% endcontent-ref %}

{% content-ref url="/pages/8Kb0T8W2WDzzVuZxUauJ" %}
[Norbix Functions](/norbix-cloud/code/norbix-functions.md)
{% endcontent-ref %}

***

## Use it from code

Everything you can do on this screen is also available programmatically — same module, same permissions, same audit trail.

| Channel      | Where to go                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **SDKs**     | [JavaScript / TypeScript](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/javascript-typescript.md) · [Python](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/python.md) · [.NET](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/net.md) · [Go](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/go-lang.md) · [Dart / Flutter](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/flutter.md) · [Swift](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/swift.md) · [Kotlin](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/kotlin.md) · [React / Redux](https://github.com/Isidos-co/codemash-docs/tree/main/sdk/react-redux.md) |
| **REST API** | [Code API](https://github.com/Isidos-co/codemash-docs/tree/main/api/code.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **AI / MCP** | Work with this module from Claude, Cursor, or any AI tool — see [MCP Server](/ai/mcp-server.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
