HydraCore
API by router

Worker bindings

List Bindings

List all bindings for a customer.

GET
/internal/v1/instances/{instance_id}/worker-bindings

Path Parameters

instance_idInstance Id
Formatuuid

Query Parameters

customer_idCustomer Id
Formatuuid

Response Body

curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/worker-bindings?customer_id=497f6eca-6276-4993-bfeb-53cbbbba6f08"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Binding

Create a person-channel binding. Auth: Bearer proxy key.

POST
/internal/v1/instances/{instance_id}/worker-bindings

Path Parameters

instance_idInstance Id
Formatuuid
channel_addressChannel Address
Length1 <= length <= 255
channel_typeChannel Type

One of: ('whatsapp', 'sms', 'voice', 'telegram', 'email')

customer_idCustomer Id
Formatuuid
person_idPerson Id
Formatuuid

Response Body

curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/worker-bindings" \  -H "Content-Type: application/json" \  -d '{    "channel_address": "string",    "channel_type": "string",    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "person_id": "087e858e-473c-4f50-b5b0-c1df6c021550"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Rebind Channel

Rebind a worker to a new channel address. Revokes old, creates unverified new.

POST
/internal/v1/instances/{instance_id}/worker-bindings/{binding_id}/rebind

Path Parameters

instance_idInstance Id
Formatuuid
binding_idBinding Id
Formatuuid
new_addressNew Address
Length1 <= length <= 255

Response Body

curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/worker-bindings/497f6eca-6276-4993-bfeb-53cbbbba6f08/rebind" \  -H "Content-Type: application/json" \  -d '{    "new_address": "string"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Revoke Binding

Revoke a worker-channel binding.

POST
/internal/v1/instances/{instance_id}/worker-bindings/{binding_id}/revoke

Path Parameters

instance_idInstance Id
Formatuuid
binding_idBinding Id
Formatuuid

Response Body

curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/worker-bindings/497f6eca-6276-4993-bfeb-53cbbbba6f08/revoke"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Tenant List Bindings

List worker-channel bindings for a customer. Auth: JWT (admin only).

GET
/v1/customers/{customer_id}/worker-bindings
AuthorizationBearer <token>

In: header

Path Parameters

customer_idCustomer Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X GET "https://loading/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/worker-bindings" \  -H "X-Api-Key: string"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Tenant Create Binding

Create a worker-channel binding. Auth: JWT (admin only).

POST
/v1/customers/{customer_id}/worker-bindings
AuthorizationBearer <token>

In: header

Path Parameters

customer_idCustomer Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key
channel_addressChannel Address
Length1 <= length <= 255
channel_typeChannel Type

One of: ('whatsapp', 'sms', 'voice', 'telegram', 'email')

customer_idCustomer Id
Formatuuid
person_idPerson Id
Formatuuid

Response Body

curl -X POST "https://loading/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/worker-bindings" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{    "channel_address": "string",    "channel_type": "string",    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "person_id": "087e858e-473c-4f50-b5b0-c1df6c021550"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Tenant Rebind

Rebind a worker to a new address. Auth: JWT (admin only).

POST
/v1/customers/{customer_id}/worker-bindings/{binding_id}/rebind
AuthorizationBearer <token>

In: header

Path Parameters

customer_idCustomer Id
Formatuuid
binding_idBinding Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key
new_addressNew Address
Length1 <= length <= 255

Response Body

curl -X POST "https://loading/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/worker-bindings/497f6eca-6276-4993-bfeb-53cbbbba6f08/rebind" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{    "new_address": "string"  }'
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Tenant Revoke Binding

Revoke a worker-channel binding. Auth: JWT (admin only).

POST
/v1/customers/{customer_id}/worker-bindings/{binding_id}/revoke
AuthorizationBearer <token>

In: header

Path Parameters

customer_idCustomer Id
Formatuuid
binding_idBinding Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X POST "https://loading/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/worker-bindings/497f6eca-6276-4993-bfeb-53cbbbba6f08/revoke" \  -H "X-Api-Key: string"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}