Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
description: 'The MarkMesh REST API is a JSON:API-compliant interface for
managing trademarks, filings, clients and watches. It is the
same surface used by the MarkMesh web UI, exposed for machine
integrations under the `mm_live_*` / `mm_test_*` API-key auth. Two integration shapes:
- **Customer-self** — you manage your own organisation''s
trademark portfolio. Use the resource tags (Clients,
Trademarks, Filings, Watches) directly. - **Partner / agency** — you manage *other* organisations''
portfolios on their behalf. Read managed-orgs and their data
via the **Partner** tag; create or update by passing
`organization_id` on the existing customer-side endpoints. Each call requires an active `PartnerRelationship`. ## Quickstart
1. Create an API key in the dashboard at `/api/keys` (live or sandbox). 2. Set the `Authorization: Bearer mm_live_…` header on every request. 3. Hit `GET /v1/introspect` to confirm the key is valid and to see
which organisation it is bound to. 4. Browse the endpoint reference below or jump to one of the
guides. ```bash
curl https://api.markmesh.com/v1/introspect \
-H "Authorization: Bearer mm_live_xxxxxxxx"
```
---
## Authentication
Every request must carry a Bearer token in the `Authorization`
header. Token prefixes:
- `mm_live_*` — production keys, bound to a live organisation,
hit live trademark-office APIs
- `mm_test_*` — sandbox keys, bound to a sandbox organisation,
backed by the sandbox dataset described below
Tokens are shown **once** at creation. Lost a token? Revoke and
recreate. Tokens are scoped to one organisation. A `mm_live_*`
key against a sandbox organisation — or vice versa — returns
`401 environment_mismatch`. ---
## Sandbox
Sandbox keys (`mm_test_*`) run against a curated test dataset
designed for integration testing and CI. Same routes, same
JSON:API shapes, same headers as production — only the data
your customer code consumes changes. Production logic runs
unmodified. Every office in sandbox is covered by **deterministic test
data**: each office exposes three known marks with stable
identifiers (`MM--001/002/003`), owner
`MarkMesh Sandbox Co.`, a mix of `:registered` and `:pending`
status. The same query against the same office returns the
same hits today, tomorrow, next year — so your CI can assert
exact mark numbers, dates, and Nice/Vienna classes without
flakiness. Search is case-insensitive substring on `mark_text`,
`application_number`, and `registration_number`:
```bash
# Returns the "ALPHA" mark from each requested office
curl ''https://api.markmesh.com/v1/search?q=ALPHA&offices=FR,JP,KR,ES'' \
-H "Authorization: Bearer mm_test_xxxxxxxx"
# Exact-number lookup — registers a sandbox filing on a trademark
curl ''https://api.markmesh.com/v1/filings/import_from_office'' \
-H "Authorization: Bearer mm_test_xxxxxxxx" \
-d ''{"office":"FR","number":"MM-FR-001","trademark_id":""}''
```
Sandbox organisations also short-circuit billing operations
(Stripe is never called from sandbox), enforce per-resource
storage caps (100 trademarks / 200 filings / 50 clients), and
expose a `reset_sandbox` action that wipes all data in one
call — perfect for resetting state between CI runs. No production filings are ever created against an office from
a sandbox key. ---
## Pagination
List endpoints use **keyset pagination** — no offset, no
`page=2`. The response carries a `meta.page` block with
`after` / `before` / `total_count`; pass the cursor back via
`page[after]=…` to fetch the next slice. - `page[limit]` — page size (default 25, max 100)
- `page[after]` — keyset cursor returned in the previous response
```bash
curl ''https://api.markmesh.com/v1/filings?page[limit]=10'' \
-H "Authorization: Bearer mm_live_xxxxxxxx"
```
Sorting and filtering have their own sections below; both
layer on top of pagination via separate query params. ---
## Sorting
Every list endpoint accepts a `sort` query parameter. Pass one
or more attribute names, comma-separated; prefix with `-` for
descending order.'
title: MarkMesh Organisation API
version: v1
servers:
- description: Production API surface
url: https://api.markmesh.com/v1
security:
- bearerAuth: []
tags:
- description: 'Your own organisation row. Retrieve its metadata, update settings, close the workspace, or read its activity feed. The API key resolves the target — there is no `organization_id` path parameter and no way to read another customer''s organisation through this tag.
The activity feed is a read-only stream of every business-relevant mutation (create / update / close / restore on clients, trademarks, filings, watches; sign-ins; admin actions) with actor + entity + timestamp. Use it as an integration-debug stream or to drive your own activity widgets.'
name: Organisation
paths:
/organizations/{id}:
get:
deprecated: false
description: Retrieve an organization by id. Scoped to the calling actor's organisation.
parameters:
- description: Your organisation's UUID. Get it from `GET /v1/introspect`.
in: path
name: id
required: true
schema:
format: uuid
type: string
style: form
responses:
'200':
content:
application/vnd.api+json:
schema:
additionalProperties: false
properties:
data:
$ref: '#/components/schemas/organization'
description: Success
'401':
description: API key or session credential missing, invalid, expired, or revoked
'404':
description: Resource not found, or not visible to this actor
security:
- UserJWT: []
- ApiKey: []
summary: Retrieve my organisation
tags:
- Organisation
operationId: getOrganizationsById
x-operation-id-source: derived
patch:
deprecated: false
description: Update your organisation's details — name, billing fields, contact info. Any field omitted from the payload is left unchanged.
parameters:
- description: Your organisation's UUID. Get it from `GET /v1/introspect`.
in: path
name: id
required: true
schema:
format: uuid
type: string
style: form
requestBody:
content:
application/vnd.api+json:
schema:
additionalProperties: false
properties:
data:
additionalProperties: false
properties:
attributes:
additionalProperties: false
properties:
billing_address_1:
anyOf:
- type: string
- type: 'null'
description: Billing address line 1
billing_address_2:
anyOf:
- type: string
- type: 'null'
description: Billing address line 2 (optional)
billing_city:
anyOf:
- type: string
- type: 'null'
description: Billing city
billing_company_name:
anyOf:
- type: string
- type: 'null'
description: Company name on invoices (may differ from organization name)
billing_country:
anyOf:
- type: string
- type: 'null'
description: Billing country (ISO 3166-1 alpha-2)
billing_email:
anyOf:
- type: string
- type: 'null'
description: Email address for invoice delivery
billing_postal_code:
anyOf:
- type: string
- type: 'null'
description: Billing postal / zip code
billing_state:
anyOf:
- type: string
- type: 'null'
description: Billing state or province
billing_tax_id:
anyOf:
- type: string
- type: 'null'
description: Tax identification number (VAT, GST, EIN, etc.)
name:
anyOf:
- type: string
- type: 'null'
description: Organization name displayed throughout the application
type: object
id:
description: Must match the `{id}` in the URL path. JSON:API requires it in the body; you cannot change your organisation's id this way.
format: uuid
type: string
type:
description: JSON:API resource type. Always `"organization"`.
enum:
- organization
required:
- id
type: object
required:
- data
type: object
description: Request body for the /organizations/:id operation on organization resource
required: false
responses:
'200':
content:
application/vnd.api+json:
schema:
additionalProperties: false
properties:
data:
$ref: '#/components/schemas/organization'
description: Success
'401':
description: API key or session credential missing, invalid, expired, or revoked
'404':
description: Resource not found, or not visible to this actor
'422':
description: Validation error — field-level detail in the response body
security:
- UserJWT: []
- ApiKey: []
summary: Update my organisation
tags:
- Organisation
operationId: patchOrganizationsById
x-operation-id-source: derived
/activities:
get:
deprecated: false
description: 'Activity feed for the calling actor''s own organisation. The server picks the target org from the API key''s owning org — no parameter needed.
**Filterable attributes**: `action`, `action_type`, `actor_id`, `actor_role`, `actor_type`, `category`, `entity_id`, `entity_type`, `id`, `inserted_at`, `metadata`. See the `Filtering` section under Introduction for the query syntax.
**Sortable attributes**: `action`, `action_type`, `actor_id`, `actor_role`, `actor_type`, `category`, `entity_id`, `entity_type`, `id`, `inserted_at`, `metadata`. See the `Sorting` section under Introduction for the syntax.'
parameters: []
responses:
'200':
content:
application/vnd.api+json:
schema:
additionalProperties: false
properties:
data:
description: An array of resource objects representing a activity
items:
$ref: '#/components/schemas/activity'
type: array
uniqueItems: true
type: object
description: Success
'401':
description: API key or session credential missing, invalid, expired, or revoked
security:
- UserJWT: []
- ApiKey: []
summary: List activities
tags:
- Organisation
operationId: getActivities
x-operation-id-source: derived
/organizations/{id}/close:
patch:
deprecated: false
description: 'Close your organisation. **Your API keys are revoked immediately** — any subsequent request returns 401, so make sure you''ve exported anything you need before calling this.
Active clients, trademarks, and filings are soft-closed alongside the organisation. Entities you previously closed yourself stay closed with their original reason. The organisation enters a 365-day retention window before permanent deletion; a platform admin can reopen it within that window, which restores only the entities this call closed.'
parameters:
- description: Your organisation's UUID. Get it from `GET /v1/introspect`.
in: path
name: id
required: true
schema:
format: uuid
type: string
style: form
requestBody:
content:
application/vnd.api+json:
schema:
additionalProperties: false
properties:
data:
additionalProperties: false
properties:
id:
description: Must match the `{id}` in the URL path. JSON:API requires it in the body; you cannot change your organisation's id this way.
format: uuid
type: string
type:
description: JSON:API resource type. Always `"organization"`.
enum:
- organization
required:
- id
type: object
required:
- data
type: object
description: Request body for the /organizations/:id/close operation on organization resource
required: false
responses:
'200':
content:
application/vnd.api+json:
schema:
additionalProperties: false
properties:
data:
description: Echoes the closed organisation (id + type only — by the time you read this your API key is invalid).
properties:
id:
description: Your organisation's UUID.
format: uuid
type: string
type:
enum:
- organization
type: string
type: object
type: object
description: Organisation closed. All API keys for this organisation are revoked as part of this call — subsequent requests with the same key return 401.
'401':
description: API key or session credential missing, invalid, expired, or revoked
'404':
description: Resource not found, or not visible to this actor
'422':
description: Validation error — field-level detail in the response body
security:
- UserJWT: []
- ApiKey: []
summary: Close my organisation
tags:
- Organisation
operationId: patchOrganizationsByIdClose
x-operation-id-source: derived
components:
schemas:
organization:
additionalProperties: false
properties:
attributes:
additionalProperties: false
description: An attributes object for a organization.
properties:
billing_address_1:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: Billing address line 1.
billing_address_2:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: Billing address line 2 (optional).
billing_city:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: Billing city.
billing_company_name:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: Company name on invoices (may differ from organization name).
billing_country:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: Billing country (ISO 3166-1 alpha-2).
billing_email:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: Email address for invoice delivery.
billing_postal_code:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: Billing postal / zip code.
billing_state:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: Billing state or province.
billing_tax_id:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: Tax identification number (VAT, GST, EIN, etc.).
has_logo?:
anyOf:
- type:
- boolean
- 'null'
- type: 'null'
description: True when a logo blob is configured (no bytes loaded).
is_partner:
description: True if the organisation can act as a partner managing other workspaces. See the Partner endpoints.
type: boolean
is_sandbox:
description: 'True for sandbox workspaces (test data, billing disabled, office calls routed to sandbox-mode adapters). The token prefix must match the workspace environment: `mm_live_*` keys against live workspaces only, `mm_test_*` keys against sandbox workspaces only — mismatches return 401 `environment_mismatch`.'
type: boolean
name:
description: Organization name displayed throughout the application.
type: string
required:
- name
- is_partner
- is_sandbox
type: object
id:
description: Resource UUID.
format: uuid
type: string
type:
description: JSON:API resource type. Always `"organization"`.
enum:
- organization
type: string
required:
- type
- id
type: object
activity:
additionalProperties: false
properties:
attributes:
additionalProperties: false
description: An attributes object for a activity.
properties:
action:
description: Human-readable event name, e.g. organization_updated, filing_phase_changed.
type: string
action_type:
anyOf:
- enum:
- create
- update
- destroy
- transition
- access
- null
type:
- string
- 'null'
- type: 'null'
description: Structured action classification for querying.
actor_id:
anyOf:
- format: uuid
type:
- string
- 'null'
- type: 'null'
description: Who did it (FK → users, nil for system actions).
actor_role:
description: 'Role of the actor: account (self), admin (staff), system (automated).'
enum:
- account
- admin
- system
type: string
actor_type:
description: Principal type. `user` = dashboard interactive actor, `api_key` = machine integration, `system` = internal worker (no end-user).
enum:
- user
- api_key
- system
type: string
category:
anyOf:
- enum:
- data
- security
- access
- admin
- gdpr
- null
type:
- string
- 'null'
- type: 'null'
description: Business category for filtering and reporting.
entity_id:
anyOf:
- type:
- string
- 'null'
- type: 'null'
description: ID of the affected record (string to support any ID type).
entity_type:
description: 'What was changed: user, organization, client, trademark, filing, secret, office, integration, suppression, cronjob, doi_challenge, system.'
type: string
inserted_at:
description: ''
metadata:
description: 'Context: request_id, source, organization_id, structured per event-type.'
type: object
required:
- entity_type
- action
- actor_role
- actor_type
- metadata
- inserted_at
type: object
id:
description: Resource UUID.
format: uuid
type: string
type:
description: JSON:API resource type. Always `"activity"`.
enum:
- activity
type: string
required:
- type
- id
type: object
securitySchemes:
ApiKey:
bearerFormat: Opaque API key (prefix mm_live_ or mm_test_)
description: Static API key for machine integrations. Issued via the UI at `/account/api-keys`. Prefix `mm_live_*` for production, `mm_test_*` for sandbox. Tokens are shown ONCE at creation — store them immediately.
scheme: bearer
type: http
UserJWT:
bearerFormat: JWT
description: Session credential issued when signing in through the MarkMesh dashboard (magic-link or passkey). Used by the dashboard itself; most external integrations should authenticate with an API key instead.
scheme: bearer
type: http
bearerAuth:
bearerFormat: JWT
description: JWT for bearer authentication
scheme: bearer
type: http