Skip to main content
POST
/
addresses
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/addresses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agentId": "<string>",
  "street1": "<string>",
  "city": "<string>",
  "state": "<string>",
  "postalCode": "<string>",
  "country": "<string>",
  "label": "<string>",
  "street2": "<string>"
}
'
{
  "id": "<string>",
  "agentId": "<string>",
  "orgId": "<string>",
  "label": "<string>",
  "street1": "<string>",
  "street2": "<string>",
  "city": "<string>",
  "state": "<string>",
  "postalCode": "<string>",
  "country": "<string>",
  "validated": true,
  "validatedAt": "2023-11-07T05:31:56Z",
  "provider": "<string>",
  "metadata": {},
  "isPrimary": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Body

application/json

Input for creating a new address identity

agentId
required

Agent identifier that owns this address

Pattern: ^[0-9a-z]+$
type
enum<string>
required

Type of address to create

Available options:
BILLING,
SHIPPING,
MAILING,
REGISTERED
street1
string
required

Primary street address line

Minimum string length: 1
city
string
required

City name

Minimum string length: 1
state
string
required

State or province

Minimum string length: 1
postalCode
string
required

Postal or ZIP code

Minimum string length: 1
country
string
required

2-character ISO 3166-1 alpha-2 country code

Required string length: 2
Pattern: ^[A-Z]{2}$
label
string

User-defined label for the address

street2
string

Secondary street address line (apt, suite, etc.)

Response

200 - application/json

OK

Full address identity record

id
string
required

Unique address identity identifier

agentId
string
required

Agent that owns this address

orgId
string
required

Organization the address belongs to

type
enum<string>
required

Address type

Available options:
BILLING,
SHIPPING,
MAILING,
REGISTERED
label
string | null
required

User-defined label

street1
string
required

Primary street address line

street2
string | null
required

Secondary street address line

city
string
required

City name

state
string
required

State or province

postalCode
string
required

Postal or ZIP code

country
string
required

2-character ISO country code

validated
boolean
required

Whether the address has been validated

validatedAt
string<date-time> | null
required

Timestamp when the address was validated

provider
string | null
required

Validation provider name

metadata
object | null
required

Additional metadata

isPrimary
boolean
required

Whether this is the primary address for its type

createdAt
string<date-time>
required

Timestamp when the address was created

updatedAt
string<date-time>
required

Timestamp when the address was last updated