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.
openapi: 3.2.0
info:
description: 'The ReplyLayer REST API for AI agents — send, receive, read, and reply to email with built-in security scanning. Authenticate with an API key (`Authorization: Bearer rly_live_.`). This is the customer contract only; operator/admin endpoints and the session-cookie dashboard surface are not part of this spec.'
title: ReplyLayer Simulator API
version: 1.0.0
servers:
- description: Production
url: https://api.replylayer.ai
security:
- BearerApiKey: []
tags:
- name: Simulator
paths:
/v1/simulator/inbound:
post:
operationId: postV1SimulatorInbound
requestBody:
content:
application/json:
schema:
additionalProperties: false
properties:
label:
description: Optional correlation label appended, after sanitization, to the synthetic message subject. Use it to find an injection that returns pending.
maxLength: 200
type: string
mailbox_id:
description: Target mailbox name or UUID. Agent keys must be scoped to this mailbox.
minLength: 1
type: string
scenario:
description: clean exercises ordinary inbound ingestion. prompt_injection_quarantined exercises the real scanner with a prompt-injection fixture; use the returned status as the authoritative final state.
enum:
- clean
- prompt_injection_quarantined
type: string
required:
- mailbox_id
- scenario
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties:
message_id:
description: Present when scanning reaches available or quarantined within the bounded poll window.
type: string
status:
description: available or quarantined is the resolved message state. pending means scanning continues asynchronously; use mailbox wait or list to find the labeled message.
enum:
- available
- quarantined
- pending
type: string
required:
- status
type: object
description: Success
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Validation error
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Missing or invalid API key
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Not found
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Rate limited
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: 'Internal error (code: INTERNAL_ERROR)'
summary: Inject a synthetic inbound message (simulator)
tags:
- Simulator
components:
schemas:
Error:
description: Standard error envelope. `code` is a stable machine-readable string.
properties:
code:
type: string
details:
additionalProperties: true
type: object
error:
type: string
required:
- error
- code
type: object
securitySchemes:
BearerApiKey:
description: 'ReplyLayer API key: `Authorization: Bearer rly_live_<public_id>.<secret>`.'
scheme: bearer
type: http