Skip to content

Create API key

POST
/api-keys
curl --request POST \
--url https://api.ethos.network/api/v2/api-keys \
--header 'Content-Type: application/json' \
--data '{ "address": "example", "expiresAt": "2026-04-15T12:00:00Z", "message": "example", "name": "example", "signature": "example" }'

Authenticates via SIWE signature and creates an API key for the associated profile.

Media typeapplication/json
object
address
required

Ethereum address (0x-prefixed, 20 bytes)

string
expiresAt
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
message
required
string
>= 1 characters
name
required
string
>= 1 characters <= 100 characters
signature
required

65-byte ECDSA signature (0x-prefixed hex, 132 chars)

string

Example generated

{
"address": "example",
"expiresAt": "2026-04-15T12:00:00Z",
"message": "example",
"name": "example",
"signature": "example"
}

Successful response

Media typeapplication/json
object
expiresAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
id
required
string
name
required
string
token
required
string

Example generated

{
"expiresAt": "2026-04-15T12:00:00Z",
"id": "example",
"name": "example",
"token": "example"
}

Invalid input data

Media typeapplication/json
Invalid input data error (400)

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}

Internal server error

Media typeapplication/json
Internal server error error (500)

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}