{"openapi":"3.1.0","info":{"title":"NextMsg Ingress API","version":"1.2.0","description":"Minimalist one-way push notifications for AI agents, CI jobs, scripts, and servers. Send text directly to user phones without accounts or complex SDKs."},"servers":[{"url":"https://api.nextmsg.app","description":"Production Edge API"}],"paths":{"/p/{send_key}":{"post":{"operationId":"sendMessageByPath","summary":"Send message (key in URL path)","description":"Deliver an instant push notification to the inbox identified by send_key. Accepts application/json or raw text/plain.","parameters":[{"name":"send_key","in":"path","required":true,"description":"The recipient's personal send key (e.g. nextmsg_live_...)","schema":{"type":"string"}},{"name":"channel","in":"query","required":false,"description":"Optional channel for text/plain bodies (1-32 lowercase characters: a-z, 0-9, -, _). Defaults to general.","schema":{"type":"string","maxLength":32,"default":"general"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}},"text/plain":{"schema":{"type":"string","minLength":1,"maxLength":640}}}},"responses":{"200":{"description":"Message queued for push delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"Invalid message or channel name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, or revoked send key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly free tier limit (100 messages) reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Message longer than 640 characters or request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/send":{"post":{"operationId":"sendMessageByHeader","summary":"Send message (key in Authorization header)","description":"Deliver an instant push notification with the send key passed in Authorization: Bearer {send_key}.","security":[{"SendKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"responses":{"200":{"description":"Message queued for push delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"Invalid message or channel name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, malformed, or revoked send key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Monthly free tier limit (100 messages) reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Message longer than 640 characters or request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"SendKeyAuth":{"type":"http","scheme":"bearer","description":"NextMsg send key (nextmsg_live_...)"}},"schemas":{"SendMessageRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":640,"description":"Message content (1-640 characters after cleanup: terminal color codes, control characters, bidi overrides and zero-width characters are removed). Supports **bold**, *italic*, ~~strikethrough~~, `code`. Links are inert plain text."},"channel":{"type":"string","minLength":1,"maxLength":32,"default":"general","pattern":"^[a-z0-9_-]+$","description":"Channel tag (e.g. ci, deploy, infra, ml)"}}},"SendMessageResponse":{"type":"object","required":["success","id","status"],"properties":{"success":{"type":"boolean","example":true},"id":{"type":"string","format":"uuid","description":"Unique UUIDv7 message ID"},"status":{"type":"string","enum":["queued","stored"],"example":"queued","description":"\"queued\": the push is on its way. \"stored\": the message is saved but the push could not be queued; the app receives it on its next sync. Do not resend."}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}