{"openapi":"3.1.0","info":{"title":"Kennet API","description":"Synthetic twins of agent traces. Authenticate with your secret key as a bearer token.\n\nA platform that twins traces for its own customers makes five calls:\n\n1. `POST /v1/kennet/webhook_endpoints` once, with the https `url` that takes your events. Keep the `secret` it answers: it is said this once, and each delivery's `webhook-signature` is verified with it.\n2. `POST /v1/kennet/twins` for each trace: `file`, with `end_user` (your id for the customer the trace belongs to; never a person's name or email) and `key` (64 hex characters you keep per customer: under one key a person, an organisation or an account gets the same stand-in in every trace of that customer's). Send an `Idempotency-Key` so a retry never starts a second twin. It answers 202 with the twin queued.\n3. Take the `kennet.twin.completed` or `kennet.twin.failed` event, whose `data` is the twin with its `end_user`; or `GET /v1/kennet/twins/{twin_id}` until its `status` is `completed` or `failed`.\n4. `GET /v1/kennet/twins/{twin_id}/content` for the twinned file, kept 7 days.\n5. `GET /v1/kennet/twins?end_user=<id>` for one customer's twins, newest first.\n","version":"2026-10-11"},"servers":[{"url":"https://api.metaphi.ai"}],"paths":{"/v1/kennet/twins":{"post":{"summary":"Create a twin","description":"Upload a trace and start its twin. Answers 202 with the twin queued.","operationId":"create_twin","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"in":"header","name":"Metaphi-Version","required":false,"description":"The API version; the one there is, and the default.","schema":{"type":"string","enum":["2026-10-11"]}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/TwinCreateParams"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Twin"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"401":{"description":"No working API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"403":{"description":"The key does not hold access to twins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"429":{"description":"A rate limit; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"503":{"description":"Try again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"402":{"description":"The organization's balance is used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"409":{"description":"A conflict: an idempotency key, or a twin not completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"413":{"description":"The file is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}}},"security":[{"secretKey":[]}]},"get":{"summary":"List twins","description":"The tenant's twins, newest first, a page at a time; one end_user's\nalone when the query names it.","operationId":"list_twins","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"How many, 1 to 100.","default":10,"title":"Limit"},"description":"How many, 1 to 100."},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A twin id: the page after it.","title":"Starting After"},"description":"A twin id: the page after it."},{"name":"end_user","in":"query","required":false,"schema":{"type":"string","description":"Only the twins created with this end_user.","default":"","title":"End User"},"description":"Only the twins created with this end_user."},{"in":"header","name":"Metaphi-Version","required":false,"description":"The API version; the one there is, and the default.","schema":{"type":"string","enum":["2026-10-11"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwinList"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"401":{"description":"No working API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"403":{"description":"The key does not hold access to twins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"429":{"description":"A rate limit; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"503":{"description":"Try again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"404":{"description":"No such object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}}},"security":[{"secretKey":[]}]}},"/v1/kennet/twins/{twin_id}":{"get":{"summary":"Retrieve a twin","description":"One twin, as it stands now.","operationId":"get_twin","parameters":[{"name":"twin_id","in":"path","required":true,"schema":{"type":"string","title":"Twin Id"}},{"in":"header","name":"Metaphi-Version","required":false,"description":"The API version; the one there is, and the default.","schema":{"type":"string","enum":["2026-10-11"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Twin"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"401":{"description":"No working API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"403":{"description":"The key does not hold access to twins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"429":{"description":"A rate limit; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"503":{"description":"Try again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"404":{"description":"No such object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}}},"security":[{"secretKey":[]}]}},"/v1/kennet/twins/{twin_id}/content":{"get":{"summary":"Download a twin's content","description":"The twinned file, once the twin completed; 410 after its 7 days.","operationId":"get_twin_content","parameters":[{"name":"twin_id","in":"path","required":true,"schema":{"type":"string","title":"Twin Id"}},{"in":"header","name":"Metaphi-Version","required":false,"description":"The API version; the one there is, and the default.","schema":{"type":"string","enum":["2026-10-11"]}}],"responses":{"200":{"description":"The twinned file, in the format it came in.","content":{"application/json":{"schema":{}},"application/octet-stream":{}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"401":{"description":"No working API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"403":{"description":"The key does not hold access to twins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"429":{"description":"A rate limit; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"503":{"description":"Try again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"404":{"description":"No such object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"409":{"description":"A conflict: an idempotency key, or a twin not completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"410":{"description":"The content is past its retention.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}}},"security":[{"secretKey":[]}]}},"/v1/kennet/webhook_endpoints":{"get":{"summary":"List webhook endpoints","description":"The tenant's webhook endpoints, newest first; never their secrets.","operationId":"list_webhook_endpoints","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"401":{"description":"No working API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"403":{"description":"The key does not hold access to twins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"429":{"description":"A rate limit; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"503":{"description":"Try again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}}},"security":[{"secretKey":[]}],"parameters":[{"in":"header","name":"Metaphi-Version","required":false,"description":"The API version; the one there is, and the default.","schema":{"type":"string","enum":["2026-10-11"]}}]},"post":{"summary":"Create a webhook endpoint","description":"Send kennet.twin.completed and kennet.twin.failed events to an https URL. The\nanswer carries the endpoint's signing secret, the one time it is said.","operationId":"create_webhook_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointParams"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"401":{"description":"No working API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"403":{"description":"The key does not hold access to twins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"429":{"description":"A rate limit; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"503":{"description":"Try again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}}},"security":[{"secretKey":[]}],"parameters":[{"in":"header","name":"Metaphi-Version","required":false,"description":"The API version; the one there is, and the default.","schema":{"type":"string","enum":["2026-10-11"]}}]}},"/v1/kennet/webhook_endpoints/{endpoint_id}":{"delete":{"summary":"Delete a webhook endpoint","description":"Stop sending to an endpoint; its pending deliveries are dropped.","operationId":"delete_webhook_endpoint","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}},{"in":"header","name":"Metaphi-Version","required":false,"description":"The API version; the one there is, and the default.","schema":{"type":"string","enum":["2026-10-11"]}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedWebhookEndpoint"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"401":{"description":"No working API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"403":{"description":"The key does not hold access to twins.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"429":{"description":"A rate limit; see Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"503":{"description":"Try again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}},"404":{"description":"No such object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Metaphi-Version":{"description":"The API version the answer is in.","schema":{"type":"string","enum":["2026-10-11"]}},"Request-Id":{"description":"This request's id, as the error object says it.","schema":{"type":"string"}}}}},"security":[{"secretKey":[]}]}}},"components":{"schemas":{"TwinCreateParams":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The trace: JSON, JSON Lines or text, at most 50 MiB (2 MiB in test mode)."},"key":{"type":"string","title":"Key","description":"Optional 64 hex characters keying the synthetic values: the same key gives one person the same twin in every trace of a corpus.","default":""},"confidential":{"items":{"type":"string"},"type":"array","title":"Confidential","description":"Organisations to treat as confidential although public; repeat the field for each.","default":[]},"end_user":{"type":"string","title":"End User","description":"Optional: your id for the customer the trace belongs to; never a person's name or email. 1 to 128 characters of letters, digits, '.', '_', ':' and '-'. The twin says it back and the list filters by it.","default":""}},"type":"object","required":["file"],"title":"TwinCreateParams"},"DeletedWebhookEndpoint":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"webhook_endpoint","title":"Object","default":"webhook_endpoint"},"deleted":{"type":"boolean","const":true,"title":"Deleted","default":true}},"type":"object","required":["id"],"title":"DeletedWebhookEndpoint"},"Error":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"type":"object","required":["error"],"title":"Error","description":"Every non-2xx answer."},"ErrorDetail":{"properties":{"type":{"type":"string","title":"Type"},"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"retryable":{"type":"boolean","title":"Retryable"},"request_id":{"type":"string","title":"Request Id"},"action_url":{"type":"string","title":"Action Url","description":"On out_of_credit only: the page where the organization adds credit."}},"type":"object","required":["type","code","message","retryable","request_id"],"title":"ErrorDetail"},"Twin":{"properties":{"id":{"type":"string","title":"Id","description":"twin_ followed by its id."},"object":{"type":"string","const":"kennet.twin","title":"Object","default":"kennet.twin"},"status":{"type":"string","enum":["queued","running","completed","failed"],"title":"Status"},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"completed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed","description":"Unix seconds it ended, completed or failed."},"filename":{"type":"string","title":"Filename","description":"The uploaded file's name."},"error":{"anyOf":[{"$ref":"#/components/schemas/TwinError"},{"type":"null"}],"description":"Why it failed; null otherwise."},"livemode":{"type":"boolean","title":"Livemode","description":"False for a test-mode twin."},"end_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End User","description":"The end_user the twin was created with: your id for the customer the trace belongs to; null when none was given."}},"type":"object","required":["id","status","created","completed","filename","error","livemode","end_user"],"title":"Twin","description":"A synthetic twin of one trace: every value that identifies a person,\na private organisation, an account or a secret replaced at every\noccurrence with one consistent synthetic value of the same kind, the\ntrace's structure and format kept."},"TwinError":{"properties":{"type":{"type":"string","title":"Type","description":"The error's family: run_error or api_error."},"code":{"type":"string","title":"Code","description":"A stable code to switch on."},"message":{"type":"string","title":"Message","description":"A sentence for a person."},"retryable":{"type":"boolean","title":"Retryable","description":"Whether uploading the same trace again may succeed."}},"type":"object","required":["type","code","message","retryable"],"title":"TwinError","description":"Why a twin failed."},"TwinList":{"properties":{"object":{"type":"string","const":"list","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/Twin"},"type":"array","title":"Data"},"has_more":{"type":"boolean","title":"Has More","description":"Whether another page follows; pass the last id as starting_after."},"url":{"type":"string","title":"Url"}},"type":"object","required":["data","has_more","url"],"title":"TwinList","description":"One page of twins, newest first."},"WebhookEndpoint":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"webhook_endpoint","title":"Object","default":"webhook_endpoint"},"url":{"type":"string","title":"Url"},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"enabled_events":{"items":{"type":"string"},"type":"array","title":"Enabled Events"}},"type":"object","required":["id","url","created","enabled_events"],"title":"WebhookEndpoint","description":"Where kennet.twin.completed and kennet.twin.failed events are sent."},"WebhookEndpointList":{"properties":{"object":{"type":"string","const":"list","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/WebhookEndpoint"},"type":"array","title":"Data"},"has_more":{"type":"boolean","title":"Has More"},"url":{"type":"string","title":"Url"}},"type":"object","required":["data","has_more","url"],"title":"WebhookEndpointList"},"WebhookEndpointParams":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url","description":"An https URL on a public host."}},"type":"object","required":["url"],"title":"WebhookEndpointParams","description":"A URL to send twin events to."},"WebhookEndpointWithSecret":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"webhook_endpoint","title":"Object","default":"webhook_endpoint"},"url":{"type":"string","title":"Url"},"created":{"type":"integer","title":"Created","description":"Unix seconds."},"enabled_events":{"items":{"type":"string"},"type":"array","title":"Enabled Events"},"secret":{"type":"string","title":"Secret","description":"whsec_ followed by the base64 signing key; verify each delivery's webhook-signature with it."}},"type":"object","required":["id","url","created","enabled_events","secret"],"title":"WebhookEndpointWithSecret","description":"A new endpoint, with its signing secret: shown this once."}},"securitySchemes":{"secretKey":{"type":"http","scheme":"bearer","description":"Your secret key; a test key (its prefix ends in _test_) is test mode."}}}}