SAGARIS Contacts API

Create, update, tag, and list contacts.

GitHub OpenAPI

Operations 7

GET /contacts List contacts #
POST /contacts Create a contact #
PUT /contacts/assert Assert a contact by email #
POST /contacts/query Query contacts #
GET /contacts/{id} Get a contact #
PATCH /contacts/{id} Update contact fields #
POST /contacts/{id}/tags Add tags to a contact #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sagaris:sagaris-contacts-api"
All apis
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.

Get an API 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 Specification

sagaris-contacts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SAGARIS Public Contacts API
  version: 1.0.0
  description: 'Versioned public REST API (/api/v1). Authenticate with a workspace-scoped API key as a Bearer token (Authorization: Bearer ros_live_...). The workspace is resolved from the key; no client-supplied workspace id is ever trusted. Writes are rate-limited per key, and the writes that declare an Idempotency-Key header honour it. This document is served unauthenticated as developer documentation.'
  termsOfService: https://www.sagaris.ai/terms
  contact:
    name: SAGARIS Support
    url: https://www.sagaris.ai/contact
    email: support@sagaris.ai
servers:
- url: https://www.sagaris.ai/api/v1
  description: Versioned public API surface.
security:
- ApiKeyAuth: []
tags:
- name: Contacts
  description: Create, update, tag, and list contacts.
paths:
  /contacts:
    get:
      tags:
      - Contacts
      summary: List contacts
      description: List contacts in the key's workspace, newest first. Requires the contacts.read scope.
      operationId: listContacts
      security:
      - ApiKeyAuth:
        - contacts.read
      parameters:
      - name: limit
        in: query
        required: false
        description: Page size. Clamped to 1..100; defaults to 25.
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
      - name: offset
        in: query
        required: false
        description: Zero-based row offset. Defaults to 0.
        schema:
          type: integer
          minimum: 0
          default: 0
      responses:
        '200':
          description: A paginated list of contacts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Contact'
                  meta:
                    $ref: '#/components/schemas/ListMeta'
                  error:
                    type: 'null'
                required:
                - data
                - meta
                - error
        '401':
          description: Missing, malformed, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key does not hold the required scope for this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Query failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The database / API-keys table is not provisioned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
      - Contacts
      summary: Create a contact
      description: Create a contact in the key's workspace. At least one of email, first_name, or last_name is required. The row is stamped source=public_api. Requires the contacts.write scope.
      operationId: createContact
      security:
      - ApiKeyAuth:
        - contacts.write
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: Opaque client-supplied key. A retry with the same key replays the original response instead of writing again.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: At least one of email, first_name, or last_name is required.
              properties:
                email:
                  type: string
                  nullable: true
                first_name:
                  type: string
                  nullable: true
                last_name:
                  type: string
                  nullable: true
                company:
                  type: string
                  nullable: true
                job_title:
                  type: string
                  nullable: true
                phone:
                  type: string
                  nullable: true
                linkedin_url:
                  type: string
                  nullable: true
                website:
                  type: string
                  nullable: true
                attribution:
                  type: object
                  nullable: true
                  description: 'Optional: the tracking tags of the page the person signed up on. When they are a social post''s own tags (utm_medium=social-organic, utm_content=the post''s id), the contact is credited to that post on the Social attribution screens. Never changes the response.'
                  properties:
                    utm_source:
                      type: string
                      maxLength: 200
                    utm_medium:
                      type: string
                      maxLength: 200
                    utm_campaign:
                      type: string
                      maxLength: 200
                    utm_content:
                      type: string
                      maxLength: 200
                    landing_url:
                      type: string
                      maxLength: 4000
                      description: The landing page address, tags included.
      responses:
        '201':
          description: The created contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactEnvelope'
        '400':
          description: Invalid JSON body or field validation failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key does not hold the required scope for this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Per-key write rate limit exceeded (60 requests / 60s).
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Insert failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The database / API-keys table is not provisioned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /contacts/assert:
    put:
      tags:
      - Contacts
      summary: Assert a contact by email
      operationId: assertContact
      description: 'Create or update a live contact by case-insensitive email in the key workspace. Returns 201 on create or 200 on update. Omitted fields are preserved; empty strings clear optional profile values. Reuses canonical create/update billing and rate gates. Idempotency-Key is ignored: retries match the same live email. No lifecycle, consent, workspace or provenance overrides. Concurrent assertions converge through the live-email unique index; a race retry can consume a second write-rate token.'
      security:
      - ApiKeyAuth:
        - contacts.write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
              - email
              properties:
                email:
                  type: string
                  format: email
                  maxLength: 320
                first_name:
                  type: string
                  maxLength: 500
                last_name:
                  type: string
                  maxLength: 500
                company:
                  type: string
                  maxLength: 500
                job_title:
                  type: string
                  maxLength: 500
                phone:
                  type: string
                  maxLength: 500
                website:
                  type: string
                  maxLength: 2000
                  description: Absolute URL or empty string.
                linkedin_url:
                  type: string
                  maxLength: 2000
                  description: Absolute URL or empty string.
      responses:
        '200':
          description: Updated contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactEnvelope'
        '201':
          description: Created contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactEnvelope'
        '400':
          description: Invalid JSON body or field validation failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Workspace billing gate blocked this write.
        '403':
          description: The key does not hold the required scope for this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Concurrent email conflict; retry the assertion.
        '429':
          description: Per-key write rate limit exceeded (60 requests / 60s).
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Database or audit failure; retry the assertion.
        '503':
          description: The database / API-keys table is not provisioned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /contacts/query:
    post:
      tags:
      - Contacts
      summary: Query contacts
      operationId: queryContacts
      description: 'Filter live contacts in the key workspace. Filters are ANDed; email is case-insensitive literal equality, company/source exact equality and updated_since inclusive. Equal timestamps are ordered by id. Shares the 60 requests/minute key budget with writes. Offset pages are not a snapshot: use overlapping changed-since windows and deduplicate ids while records change.'
      security:
      - ApiKeyAuth:
        - contacts.read
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                filter:
                  type: object
                  additionalProperties: false
                  properties:
                    email:
                      type: string
                      format: email
                      maxLength: 320
                    company:
                      type: string
                      minLength: 1
                      maxLength: 500
                    source:
                      type: string
                      minLength: 1
                      maxLength: 100
                    updated_since:
                      type: string
                      format: date-time
                sort:
                  type: string
                  enum:
                  - created_at
                  - updated_at
                  default: created_at
                direction:
                  type: string
                  enum:
                  - asc
                  - desc
                  default: desc
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 25
                offset:
                  type: integer
                  minimum: 0
                  maximum: 100000
                  default: 0
      responses:
        '200':
          description: Matching contacts and pagination.
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                - meta
                - error
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Contact'
                  meta:
                    $ref: '#/components/schemas/ListMeta'
                  error:
                    type: 'null'
        '400':
          description: Invalid JSON body or field validation failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key does not hold the required scope for this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Per-key write rate limit exceeded (60 requests / 60s).
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Query failure.
        '503':
          description: The database / API-keys table is not provisioned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /contacts/{id}:
    get:
      tags:
      - Contacts
      summary: Get a contact
      operationId: getContact
      description: Retrieve one live contact by UUID in the authenticated key workspace. Unknown, archived and foreign contacts return 404.
      security:
      - ApiKeyAuth:
        - contacts.read
      parameters:
      - name: id
        in: path
        required: true
        description: The contact id, which must belong to the key's workspace.
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: The contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactEnvelope'
        '400':
          description: Invalid JSON body or field validation failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key does not hold the required scope for this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The referenced resource was not found in the key's workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Query failure.
        '503':
          description: The database / API-keys table is not provisioned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
      - Contacts
      summary: Update contact fields
      description: 'Update whitelisted fields of a workspace-owned contact. Uses the same field whitelist and normalizers as the internal edit path and writes contact_field_corrections provenance. Requires the contacts.write scope. `lifecycle` is a GATED CRM stage change, not a plain field: it must respect the stage adjacency rule, advancing to `lead` requires company fit and demonstrated interest, and advancing to `opportunity` requires a confirmed need and agreed sales next step, or the company''s configured criteria, backed by saved qualification evidence. An unearned move is refused (422 `lead_qualification_required` / `opportunity_qualification_required`), and an API key can never force past a gate (403 `force_not_permitted`). The data-quality columns (`data_confidence`, `provenance`, `confidence_score`) are SERVER-OWNED: they are derived from the edit itself and stamped at the `public_api` confidence band, so supplying them is ignored rather than persisted.'
      operationId: updateContact
      security:
      - ApiKeyAuth:
        - contacts.write
      parameters:
      - name: id
        in: path
        required: true
        description: The contact id, which must belong to the key's workspace.
        schema:
          type: string
          format: uuid
      - name: Idempotency-Key
        in: header
        required: false
        description: Opaque client-supplied key. A retry with the same key replays the original response instead of writing again.
        schema:
          type: string
      requestBody:
        required: true
        description: A partial set of the contact fields accepted by sanitizeContactUpdate (the internal PATCH whitelist), optionally plus the gated `lifecycle` stage. At least one supported field must be supplied. Unsupported and server-owned keys (`data_confidence`, `provenance`, `confidence_score`) are ignored.
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: The updated contact (public field projection).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactEnvelope'
        '400':
          description: Invalid JSON body or field validation failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key does not hold the required scope for this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The referenced resource was not found in the key's workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Per-key write rate limit exceeded (60 requests / 60s).
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Lookup, update, or provenance-write failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The database / API-keys table is not provisioned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /contacts/{id}/tags:
    post:
      tags:
      - Contacts
      summary: Add tags to a contact
      description: Add one or more tags to a workspace-owned contact. Tags are lower-cased, de-duplicated, sorted, additive, and capped at 50. Requires the contacts.write scope.
      operationId: addContactTags
      security:
      - ApiKeyAuth:
        - contacts.write
      parameters:
      - name: id
        in: path
        required: true
        description: The contact id, which must belong to the key's workspace.
        schema:
          type: string
          format: uuid
      - name: Idempotency-Key
        in: header
        required: false
        description: Opaque client-supplied key. A retry with the same key replays the original response instead of writing again.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Provide tags[] or a single tag. At least one non-empty tag is required.
              properties:
                tags:
                  type: array
                  items:
                    type: string
                tag:
                  type: string
      responses:
        '200':
          description: The contact id and its merged tag list.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      tags:
                        type: array
                        items:
                          type: string
                    required:
                    - id
                    - tags
                  error:
                    type: 'null'
                required:
                - data
                - error
        '400':
          description: Invalid JSON body or field validation failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, malformed, invalid, revoked, or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key does not hold the required scope for this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The referenced resource was not found in the key's workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Per-key write rate limit exceeded (60 requests / 60s).
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Lookup or update failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The database / API-keys table is not provisioned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ContactEnvelope:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Contact'
        error:
          type: 'null'
      required:
      - data
      - error
    Error:
      type: object
      description: The standard v1 error envelope.
      properties:
        data:
          type: 'null'
        error:
          type: string
          description: Human-readable error message.
        code:
          type: string
          description: Machine-readable error code (e.g. validation_failed, rate_limited).
        correlationId:
          type: string
          description: Present on unexpected 500s for support correlation.
      required:
      - data
      - error
    ListMeta:
      type: object
      properties:
        total:
          type: integer
          nullable: true
        limit:
          type: integer
        offset:
          type: integer
        hasMore:
          type: boolean
      required:
      - total
      - limit
      - offset
      - hasMore
    Contact:
      type: object
      description: The public contact projection returned by list and create.
      properties:
        id:
          type: string
        email:
          type: string
          nullable: true
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        job_title:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        linkedin_url:
          type: string
          nullable: true
        website:
          type: string
          nullable: true
        lifecycle:
          type: string
          nullable: true
        source:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Workspace-scoped API key presented as a Bearer token (Authorization: Bearer ros_live_...). The workspace is resolved from the key.'