Ranla Contacts API
People you can market to, with the product attributes you sync up
People you can market to, with the product attributes you sync up
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/ranla-ai:ranla-ai-contacts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Ranla Contacts API
version: 0.12.0
description: 'Transactional email API for developers.
Auth: `Authorization: Bearer rnl_…` or `stx_…` (or dashboard session cookie for integrations).
Production base URL: https://api.ranla.ai'
servers:
- url: https://api.ranla.ai
description: Production
tags:
- name: Contacts
description: People you can market to, with the product attributes you sync up
paths:
/contacts:
get:
operationId: listContacts
summary: List contacts
tags:
- Contacts
security:
- bearerAuth: []
parameters:
- name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 25
- name: cursor
in: query
schema:
type: string
- name: search
in: query
schema:
type: string
description: Matches email, first name, last name, or external id
- name: email
in: query
schema:
type: string
format: email
description: 'Exact match on the contact''s email address (case-insensitive). Returns at most one contact, or an empty `data` array when none matches. A blank value returns 400.
'
- name: status
in: query
schema:
$ref: '#/components/schemas/ContactStatus'
- name: list_id
in: query
schema:
type: string
description: Only contacts belonging to this list
responses:
'200':
description: Contact list
content:
application/json:
schema:
$ref: '#/components/schemas/ListContactsResponse'
'400':
description: Invalid cursor, invalid status filter, or blank `email` filter
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post:
operationId: upsertContact
summary: Create or update a contact
description: 'Idempotent on the email address. `attributes` is merged into whatever is
already stored, so a partial sync never wipes state you set earlier.
Setting `status` to `unsubscribed` records a marketing opt-out and emits
the `contact.unsubscribed` webhook; transactional mail is unaffected.'
tags:
- Contacts
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpsertContactRequest'
responses:
'200':
description: Contact created or updated
content:
application/json:
schema:
$ref: '#/components/schemas/ContactResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/contacts/import:
post:
operationId: importContacts
summary: Bulk import contacts
description: 'Accepts a JSON array of contacts, `{ "contacts": [...] }`, `{ "csv": "…" }`,
or a raw CSV body. CSV columns other than `email`, `external_id`,
`first_name`, and `last_name` are stored as attributes. Malformed
addresses are counted in `invalid` rather than failing the batch.
At most 5,000 contacts per request — split larger lists across several
requests. More rows returns 400; a JSON body over 8 MB returns 413.'
tags:
- Contacts
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ImportContactsRequest'
text/csv:
schema:
type: string
description: CSV text with a header row containing an `email` column
responses:
'200':
description: Import summary
content:
application/json:
schema:
$ref: '#/components/schemas/ImportContactsResponse'
'400':
description: Unreadable body, a CSV with no `email` column, or more than 5,000 contacts in one request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
message: Import is limited to 5000 contacts per request
code: validation_error
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'413':
description: Request body too large (a JSON body over 8 MB, or a CSV body over 64 MB)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error:
message: Import body is too large. Send at most 5000 contacts per request.
code: validation_error
/contacts/{id}:
get:
operationId: getContact
summary: Retrieve a contact
tags:
- Contacts
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Contact id or email address
responses:
'200':
description: Contact
content:
application/json:
schema:
$ref: '#/components/schemas/ContactResponse'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Contact not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
patch:
operationId: updateContact
summary: Update a contact
tags:
- Contacts
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Contact id or email address
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateContactRequest'
responses:
'200':
description: Contact updated
content:
application/json:
schema:
$ref: '#/components/schemas/ContactResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Contact not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
delete:
operationId: deleteContact
summary: Delete a contact
tags:
- Contacts
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Contact id or email address
responses:
'200':
description: Contact deleted
content:
application/json:
schema:
type: object
required:
- ok
properties:
ok:
type: boolean
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Contact not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
ContactStatus:
type: string
enum:
- subscribed
- unsubscribed
- bounced
- complained
description: 'Derived on read. A contact who is suppressed, or who has opted out of
newsletter mail, always reads back as `unsubscribed` — there is one
source of truth for consent and this reflects it.
'
ErrorResponse:
type: object
required:
- error
properties:
error:
type: object
required:
- message
properties:
message:
type: string
code:
$ref: '#/components/schemas/ErrorCode'
upgrade_url:
type: string
description: Dashboard path to upgrade when code is plan_limit or domain_limit
details:
description: 'Optional structured details. For send blocks this may include `suppressed` (global suppression list) or `category_unsubscribed` plus `category` and `email_id` (category opt-out).
'
ContactResponse:
type: object
required:
- contact
properties:
contact:
$ref: '#/components/schemas/Contact'
ContactSource:
type: string
enum:
- api
- import
- dashboard
- agent
- on_site
description: 'Where the contact was first created. `on_site` means an on-site message on your
website captured the address.
'
ImportContactsResponse:
type: object
required:
- created
- updated
- invalid
properties:
created:
type: integer
updated:
type: integer
invalid:
type: integer
description: Rows whose email address was malformed. They are skipped, not fatal.
UpsertContactRequest:
type: object
required:
- email
properties:
email:
type: string
format: email
external_id:
type: string
nullable: true
first_name:
type: string
nullable: true
last_name:
type: string
nullable: true
attributes:
type: object
additionalProperties: true
nullable: true
description: Merged into existing attributes. Send `null` to clear them.
status:
$ref: '#/components/schemas/ContactStatus'
source:
$ref: '#/components/schemas/ContactSource'
UpdateContactRequest:
type: object
properties:
external_id:
type: string
nullable: true
first_name:
type: string
nullable: true
last_name:
type: string
nullable: true
attributes:
type: object
additionalProperties: true
nullable: true
description: Merged into existing attributes. Send `null` to clear them.
status:
$ref: '#/components/schemas/ContactStatus'
ContactImportRow:
type: object
required:
- email
properties:
email:
type: string
format: email
external_id:
type: string
nullable: true
first_name:
type: string
nullable: true
last_name:
type: string
nullable: true
attributes:
type: object
additionalProperties: true
ImportContactsRequest:
oneOf:
- type: array
items:
$ref: '#/components/schemas/ContactImportRow'
- type: object
properties:
contacts:
type: array
items:
$ref: '#/components/schemas/ContactImportRow'
csv:
type: string
description: CSV text with a header row containing an `email` column
source:
$ref: '#/components/schemas/ContactSource'
Contact:
type: object
required:
- id
- email
- external_id
- first_name
- last_name
- attributes
- status
- source
- last_engaged_at
- created_at
- updated_at
properties:
id:
type: string
email:
type: string
format: email
external_id:
type: string
nullable: true
description: Your own id for this person, for joins back into your product
first_name:
type: string
nullable: true
last_name:
type: string
nullable: true
attributes:
type: object
additionalProperties: true
description: Flat, scalar-valued product state you sync up. Segments filter on it.
status:
$ref: '#/components/schemas/ContactStatus'
source:
$ref: '#/components/schemas/ContactSource'
last_engaged_at:
type: string
format: date-time
nullable: true
description: Last open or click across any campaign
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
ErrorCode:
type: string
description: Machine-readable error code
enum:
- validation_error
- unauthorized
- forbidden
- not_found
- conflict
- plan_limit
- domain_limit
- idempotency_conflict
- rate_limited
- upstream_error
- not_configured
- internal_error
ListContactsResponse:
type: object
required:
- data
- has_more
- next_cursor
properties:
data:
type: array
items:
$ref: '#/components/schemas/Contact'
has_more:
type: boolean
next_cursor:
type: string
nullable: true
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Ranla API key prefixed with `rnl_` or `stx_`