{"openapi":"3.1.0","info":{"title":"Puddle API","description":"Puddle's public REST API. Authenticate with a secret API key from Settings → Developers as a bearer token. Webhooks for the same objects are signed with the Standard Webhooks scheme.","version":"1.0.0"},"servers":[{"url":"https://api.puddle.co.za/v1"}],"paths":{"/inbox/conversations":{"get":{"operationId":"inbox-listConversations","summary":"List conversations","description":"Conversations, newest activity first. Page with `cursorAt` and `cursorId` from `nextCursor`. Needs the `inbox:read` scope.","tags":["conversations"],"security":[{"secretApiKey":[]}],"parameters":[{"in":"query","name":"status","schema":{"type":"string","enum":["OPEN","PENDING","SNOOZED","CLOSED","SPAM"]}},{"in":"query","name":"label","schema":{"type":"string","maxLength":60}},{"in":"query","name":"contactId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"search","schema":{"type":"string","maxLength":200}},{"in":"query","name":"cursorAt","schema":{"type":"string"}},{"in":"query","name":"cursorId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"limit","schema":{"default":30,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"}},"required":["id","type","name"],"additionalProperties":false},"contact":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","displayName","email"],"additionalProperties":false},"label":{"anyOf":[{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}},"required":["key","name"],"additionalProperties":false},{"type":"null"}]},"urgency":{"type":["string","null"]},"assigneeAdminId":{"type":["string","null"]},"subject":{"type":["string","null"]},"lastMessagePreview":{"type":["string","null"]},"lastMessageAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","status","channel","contact","label","urgency","assigneeAdminId","subject","lastMessagePreview","lastMessageAt","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"object","properties":{"cursorAt":{"type":"string"},"cursorId":{"type":"string"}},"required":["cursorAt","cursorId"],"additionalProperties":false},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/inbox/conversations/{id}":{"get":{"operationId":"inbox-getConversation","summary":"Get a conversation","description":"One conversation with its contact, label and the records it is about. Needs the `inbox:read` scope.","tags":["conversations"],"security":[{"secretApiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"}},"required":["id","type","name"],"additionalProperties":false},"contact":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["id","displayName","email"],"additionalProperties":false},"label":{"anyOf":[{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}},"required":["key","name"],"additionalProperties":false},{"type":"null"}]},"urgency":{"type":["string","null"]},"assigneeAdminId":{"type":["string","null"]},"subject":{"type":["string","null"]},"lastMessagePreview":{"type":["string","null"]},"lastMessageAt":{"type":"string"},"createdAt":{"type":"string"},"source":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"subjects":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"label":{"type":"string"}},"required":["type","id","label"],"additionalProperties":false}}},"required":["id","status","channel","contact","label","urgency","assigneeAdminId","subject","lastMessagePreview","lastMessageAt","createdAt","source","subjects"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}},"patch":{"operationId":"inbox-updateConversation","summary":"Update a conversation","description":"Change any of status (with `snoozedUntil` for SNOOZED), assignee (admin id, or null) and label (key, or null). Labels set here are never replaced by AI. Needs the `inbox:write` scope.","tags":["conversations"],"security":[{"secretApiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["OPEN","PENDING","SNOOZED","CLOSED","SPAM"]},"snoozedUntil":{"type":"string"},"assigneeAdminId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"label":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"updated":{"type":"array","items":{"type":"string"}}},"required":["id","updated"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/inbox/conversations/{id}/messages":{"get":{"operationId":"inbox-listMessages","summary":"List messages","description":"The timeline in time order: messages, internal notes and events. Use `before` to page back, `after` for what's new. Needs the `inbox:read` scope.","tags":["messages"],"security":[{"secretApiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true},{"in":"query","name":"before","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"after","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"direction":{"type":["string","null"]},"authorType":{"type":"string"},"authorAdminId":{"type":["string","null"]},"text":{"type":"string"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"deliveryStatus":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","direction","authorType","authorAdminId","text","parts","deliveryStatus","createdAt"],"additionalProperties":false}},"hasMore":{"type":"boolean"}},"required":["items","hasMore"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}},"post":{"operationId":"inbox-sendMessage","summary":"Reply or add a note","description":"A reply to the contact (`kind: MESSAGE`) or an internal note (`kind: NOTE`), sent as your app. Send the same `clientMessageId` again to retry safely. Needs the `inbox:write` scope.","tags":["messages"],"security":[{"secretApiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"default":"MESSAGE","type":"string","enum":["MESSAGE","NOTE"]},"text":{"type":"string","minLength":1,"maxLength":10000},"clientMessageId":{"type":"string","minLength":8,"maxLength":64}},"required":["text"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"direction":{"type":["string","null"]},"authorType":{"type":"string"},"authorAdminId":{"type":["string","null"]},"text":{"type":"string"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"deliveryStatus":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","kind","direction","authorType","authorAdminId","text","parts","deliveryStatus","createdAt"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/inbox/labels":{"get":{"operationId":"inbox-listLabels","summary":"List labels","description":"The store's conversation labels. Needs the `inbox:read` scope.","tags":["labels"],"security":[{"secretApiKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"colour":{"type":"string"}},"required":["key","name","description","colour"],"additionalProperties":false}}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/inbox/people":{"get":{"operationId":"inbox-searchPeople","summary":"Search people","description":"Contacts and customers without a contact, by name, email or phone. Needs the `inbox:read` scope.","tags":["contacts"],"security":[{"secretApiKey":[]}],"parameters":[{"in":"query","name":"search","schema":{"type":"string","minLength":1,"maxLength":200},"required":true},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["contact","customer"]},"id":{"type":"string"},"displayName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["type","id","displayName","email","phone"],"additionalProperties":false}}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/inbox/contacts/{id}":{"get":{"operationId":"inbox-getContact","summary":"Get a contact","description":"A contact with their identities and linked customer accounts. Merged-away ids return the surviving contact. Needs the `inbox:read` scope.","tags":["contacts"],"security":[{"secretApiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"identities":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"value":{"type":["string","null"]},"verified":{"type":"boolean"}},"required":["kind","value","verified"],"additionalProperties":false}},"customerIds":{"type":"array","items":{"type":"string"}}},"required":["id","displayName","email","phone","identities","customerIds"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/inbox/contacts/{id}/merge":{"post":{"operationId":"inbox-mergeContacts","summary":"Merge contacts","description":"Merges `mergedId` into this contact: identities, conversations and customer accounts move here. Orders stay on their customer accounts. Undo it in the admin. Needs the `contacts:write` scope.","tags":["contacts"],"security":[{"secretApiKey":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mergedId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["mergedId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"mergeId":{"type":"string"},"survivorId":{"type":"string"}},"required":["mergeId","survivorId"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}},"/inbox/channels/{channelId}/messages":{"post":{"operationId":"inbox-postChannelMessage","summary":"Post a customer's message to a custom channel","description":"For a custom channel (Settings → Inbox): stores a message from one of your customers, threading it into their conversation. Identify them by your own user id (`EXTERNAL`), an email or a phone. Replies reach you as `inbox.message.created` webhooks with `direction: OUTBOUND`. Repeating `externalMessageId` is safe. Needs the `inbox:write` scope.","tags":["channels"],"security":[{"secretApiKey":[]}],"parameters":[{"in":"path","name":"channelId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"object","properties":{"kind":{"type":"string","enum":["EXTERNAL","EMAIL","PHONE"]},"value":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","maxLength":255},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["kind","value"]},"text":{"type":"string","minLength":1,"maxLength":10000},"externalMessageId":{"type":"string","maxLength":255},"externalThreadId":{"type":"string","maxLength":255}},"required":["from","text"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string"},"messageId":{"type":"string"},"duplicate":{"type":"boolean"}},"required":["conversationId","messageId","duplicate"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the action isn't possible (the message says why).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"The secret API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"429":{"description":"Too many requests (120 a minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.TOO_MANY_REQUESTS"}}}}}}}},"components":{"schemas":{"error.BAD_REQUEST":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"The input is invalid, or the action isn't possible (the message says why)."},"code":{"type":"string","description":"The error code","example":"BAD_REQUEST"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"The input is invalid, or the action isn't possible (the message says why). error (400)","description":"The error information","example":{"code":"BAD_REQUEST","message":"The input is invalid, or the action isn't possible (the message says why).","issues":[]}},"error.UNAUTHORIZED":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"The secret API key is missing or invalid."},"code":{"type":"string","description":"The error code","example":"UNAUTHORIZED"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"The secret API key is missing or invalid. error (401)","description":"The error information","example":{"code":"UNAUTHORIZED","message":"The secret API key is missing or invalid.","issues":[]}},"error.FORBIDDEN":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox."},"code":{"type":"string","description":"The error code","example":"FORBIDDEN"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox. error (403)","description":"The error information","example":{"code":"FORBIDDEN","message":"The key lacks the scope this endpoint needs, or the store doesn't have Puddle Inbox.","issues":[]}},"error.NOT_FOUND":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Not found."},"code":{"type":"string","description":"The error code","example":"NOT_FOUND"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Not found. error (404)","description":"The error information","example":{"code":"NOT_FOUND","message":"Not found.","issues":[]}},"error.TOO_MANY_REQUESTS":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Too many requests (120 a minute per key)."},"code":{"type":"string","description":"The error code","example":"TOO_MANY_REQUESTS"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Too many requests (120 a minute per key). error (429)","description":"The error information","example":{"code":"TOO_MANY_REQUESTS","message":"Too many requests (120 a minute per key).","issues":[]}}},"securitySchemes":{"secretApiKey":{"type":"http","scheme":"bearer","description":"A secret API key (psk_…). Keep it on your server."}}}}