Ricky logorickyDocs

Create a location

POST
/knowledge/locations

Adds a branch or place the agents can share.

Scope: knowledge:write.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An organization API key, rky_live_…, created in Settings → API. Send it only from a server.

Idempotency-Key?string

Optional. A value you choose, unique per logical write, 8–200 characters: a UUID or an ID from your system such as order-10482-ready. Retrying with the same key and body replays the first response instead of repeating the write.

Length8 <= length <= 200

Request Body

application/json
  1. body

A location needs a name, an address and its coordinates.

name*string

Name customers know it by.

Length1 <= length <= 200
address*string

Full address as customers read it.

Length1 <= length <= 500
latitude*number

Latitude of the map pin, confirmed, not estimated.

Range-90 <= value <= 90
longitude*number

Longitude of the map pin, confirmed, not estimated.

Range-180 <= value <= 180
street?|

Street.

city?|

City.

state?|

State, province or region.

postal_code?|

Postal code.

country?|

Country.

country_code?|

Country code, ISO 3166-1 alpha-2.

phone?|

Phone with country code, for example +507 6000-1234.

email?|

Email.

hours?|

Opening hours, as free text.

Response Body

Success.

application/json
  1. response
data*

A branch or place the agents can send as a WhatsApp location.

curl -X POST 'https://getricky.ai/api/v1/knowledge/locations' \  -H 'Idempotency-Key: order-10482-ready' \  -H 'Content-Type: application/json' \  -d '{  "name": "Casa Nativa Albrook",  "address": "Albrook Mall, local 214, Panamá",  "latitude": 8.9733,  "longitude": -79.5511,  "phone": "+507 6000-0000",  "hours": "Lunes a sábado, 10:00 a 20:00"}'
{  "data": {    "id": "c3d4e5f6-a7b8-4c9d-8e0f-1a2b3c4d5e6f",    "name": "Casa Nativa Albrook",    "address": "Albrook Mall, local 214, Panamá",    "latitude": 8.9733,    "longitude": -79.5511,    "street": "Albrook Mall, local 214",    "city": "Panamá",    "state": "Panamá",    "postal_code": null,    "country": "Panamá",    "country_code": "PA",    "phone": "+50760000000",    "email": "albrook@example.com",    "hours": "Lunes a sábado, 10:00 a 20:00"  }}