HydraCore
API by router

Customer identities

Lookup Identity

GET
/v1/customers/lookup/identity

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

channel*Channel

Channel type

external_id*External Id

External ID to look up

instance_id?|

Optional instance scope

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response

Response for reverse lookup: channel + external_id → customer.

channel*Channel
customer_email?string|null
customer_id*Customer Id
Formatuuid
display_name?string|null
external_id*External Id
identity_id*Identity Id
Formatuuid
role_override?string|null
verified*Verified
Example Request
curl -X GET 'https://example.com/v1/customers/lookup/identity?channel=string&external_id=string'
Example Response
{  "channel": "string",  "customer_email": "string",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "display_name": "string",  "external_id": "string",  "identity_id": "011a42b9-62d7-49eb-8328-c2e454af88a1",  "role_override": "string",  "verified": true}

List Customer Identities

GET
/v1/customers/{customer_id}/identities

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid

Query Parameters

channel?|

Filter by channel

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/identities'
Example Response
[  {    "channel": "string",    "created_at": "2019-08-24T14:15:22Z",    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "display_name": "string",    "external_id": "string",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366",    "metadata": {},    "role_override": "string",    "updated_at": "2019-08-24T14:15:22Z",    "verified": true,    "verified_at": "2019-08-24T14:15:22Z"  }]

Create Customer Identity

POST
/v1/customers/{customer_id}/identities

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
channel*Channel

Channel type: telegram, whatsapp, slack, etc.

display_name?|null
external_id*External Id

External ID (chat_id, phone, etc.)

Length1 <= length <= 255
instance_id?|

Optional: scope to a specific instance

metadata?|null
role_override?|

Override channel default role: 'owner' for elevated access, null for default

Response Body

Successful Response

application/json
  1. response
channel*Channel
created_at*Created At
Formatdate-time
customer_id*Customer Id
Formatuuid
display_name?string|null
external_id*External Id
id*Id
Formatuuid
instance_id?|null
metadata?|null
role_override?string|null
updated_at*Updated At
Formatdate-time
verified*Verified
verified_at?|null
Example Request
curl -X POST 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/identities' \  -H 'Content-Type: application/json' \  -d '{  "channel": "string",  "external_id": "string"}'
Example Response
{  "channel": "string",  "created_at": "2019-08-24T14:15:22Z",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "display_name": "string",  "external_id": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366",  "metadata": {},  "role_override": "string",  "updated_at": "2019-08-24T14:15:22Z",  "verified": true,  "verified_at": "2019-08-24T14:15:22Z"}

Update Customer Identity

PATCH
/v1/customers/{customer_id}/identities/{identity_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid
identity_id*Identity Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
display_name?string|null
metadata?|null
role_override?string|null
verified?boolean|null

Response Body

Successful Response

application/json
  1. response
channel*Channel
created_at*Created At
Formatdate-time
customer_id*Customer Id
Formatuuid
display_name?string|null
external_id*External Id
id*Id
Formatuuid
instance_id?|null
metadata?|null
role_override?string|null
updated_at*Updated At
Formatdate-time
verified*Verified
verified_at?|null
Example Request
curl -X PATCH 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/identities/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "channel": "string",  "created_at": "2019-08-24T14:15:22Z",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "display_name": "string",  "external_id": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366",  "metadata": {},  "role_override": "string",  "updated_at": "2019-08-24T14:15:22Z",  "verified": true,  "verified_at": "2019-08-24T14:15:22Z"}

Delete Customer Identity

DELETE
/v1/customers/{customer_id}/identities/{identity_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid
identity_id*Identity Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

Example Request
curl -X DELETE 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/identities/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty
POST
/v1/customers/{customer_id}/identities/{identity_id}/claim-code

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

customer_id*Customer Id
Formatuuid
identity_id*Identity Id
Formatuuid

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response

Response when a claim code is generated for an identity.

code*Code
expires_in_seconds?Expires In Seconds
Default900
identity_id*Identity Id
Formatuuid
instructions*Instructions
Example Request
curl -X POST 'https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/identities/497f6eca-6276-4993-bfeb-53cbbbba6f08/claim-code'
Example Response
{  "code": "string",  "expires_in_seconds": 900,  "identity_id": "011a42b9-62d7-49eb-8328-c2e454af88a1",  "instructions": "string"}