---
name: azion-how-to-create-an-edge-service
description: >-
  Create and activate an edge service for Orchestrator edge nodes with Azion Console or API v3.
---

# How to create an edge service

> Platform versions: this page applies to API v3.x only, not to API v4.x.
> Equivalent page for API v4.x: [How to create an edge service](/en/documentation/guides/application-development/automation/create-edge-service.md)
> Release stage: Deprecated.

You can create an edge service in Azion Console or with the Azion API.

## Create the edge service

### Console

1. Access [Azion Console](https://console.azion.com/) > **Edge Services**.
2. Click on the **+ Service** button.
3. Give a name for your service.
4. Define the variables, if necessary.
   - The variables must be in the format `Variable = Value`.
5. Set the status as **Active**.
6. Click the **Save** button.
7. Go to the **Resources** tab and [provide resources](/en/documentation/guides/application-development/automation/provision-files-v3/) for your service.

### API

1. Run the following `POST` request in your terminal, replacing `[TOKEN VALUE]` with your [personal token](/en/documentation/guides/platform/account-and-billing/personal-tokens/) and informing the name of the service being created:

```bash
curl --location 'https://api.azionapi.net/edge_services/' \
--header 'Accept: application/json; version=3' \
--header 'Authorization: Token [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
  "name": "string"
}'
```

2. Keep the `id` returned in the response body. The API creates the service with `"active": false`:

```json
{
    "id": 1196,
    "name": "string",
    "updated_at": "2024-01-18T17:24:33Z",
    "last_editor": "xxxxx",
    "active": false,
    "bound_nodes": 0,
    "permissions": [
        "read",
        "write"
    ]
}
```

3. To set the service as active, run the following `PATCH` request:

```bash
curl --location --request PATCH 'https://api.azionapi.net/edge_services/:id' \
--header 'Accept: application/json; version=3' \
--header 'Authorization: Token [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{
  "active": true
}'
```

Replace `[TOKEN VALUE]` with your personal token and `:id` with the ID of the edge service.

Now, the service is active and you can bind it to your edge nodes.

> **Note**
>
> If an edge service is not active, it is not available for binding to an edge node.

> **Tip**
>
> Check the [Azion API documentation](https://api.azion.com/v3) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API.

Watch a video tutorial on how to create an edge service on Azion’s YouTube channel:
