# Register an actor endpoint

Source: https://docs.wabe.sh/api-reference/operations/registeractor/

`POST https://api.wabe.sh/v1/actor`

Register your HTTPS handler. Supply an existing disk only when you also want a fixed-disk public invocation URL.

## Authorization

Project API key from the Wabe Dashboard.

## Request body

`application/json`

Example

```json
{
  "name": "chat",
  "endpoint": "https://chat.example.com/wabe",
  "endpointSecret": "replace_with_a_random_base64url_secret"
}
```

Schema

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,128}$",
      "example": "chat"
    },
    "disk": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,128}$",
      "example": "chat-state",
      "description": "Optional default disk for the public invocation URL."
    },
    "endpoint": {
      "type": "string",
      "format": "uri",
      "example": "https://chat.example.com/wabe",
      "description": "Public HTTPS endpoint with a DNS hostname. A path is allowed. Omit credentials, query and fragment."
    },
    "endpointSecret": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{32,256}$",
      "writeOnly": true,
      "description": "Shared secret used to authenticate the Wabe broker to your handler.",
      "example": "replace_with_a_random_base64url_secret"
    }
  },
  "required": [
    "name",
    "endpoint",
    "endpointSecret"
  ],
  "additionalProperties": false
}
```

## Responses

### 201

Actor registered.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "example": "779742ad-cd09-4e1c-9170-f20968b344d4"
    },
    "name": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,128}$",
      "example": "chat"
    },
    "disk": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,128}$",
      "example": "chat-state",
      "description": "Optional default disk for the public invocation URL."
    },
    "endpoint": {
      "type": "string",
      "format": "uri",
      "example": "https://chat.example.com/wabe"
    },
    "fetchUrlTemplate": {
      "type": "string",
      "example": "https://api.wabe.sh/v1/actor/chat/disks/{disk}/instances/{instance}/fetch"
    }
  },
  "required": [
    "id",
    "name",
    "endpoint",
    "fetchUrlTemplate"
  ]
}
```

### 400

Invalid registration.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 401

Missing, invalid or revoked project API key.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 404

Disk not found in this project.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 409

Registration name already exists in this project.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 503

Actor API temporarily unavailable.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```
