{"version":"2026-02-16","generated_by":"thrd.api.machine-spec","idempotency_policy":{"key_format_regex":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$","ttl_seconds":259200,"behavior":{"same_key_same_payload":"returns previously stored response","same_key_different_payload":"409 idempotency_key_reused_with_different_payload","expired_key":"treated as new request after ttl"}},"inbound_standard_schema":{"payload_format":"standard.v1","timestamp":1739466026,"nonce":"7c2f01a7-11c6-4f4b-b8bb-00d81af012f4","recipient":"agent@thrd.email","payload":{"from":"human@example.com","to":["agent@thrd.email"],"cc":[],"subject":"Question","text":"Can your AI reply?","attachments":[{"filename":"brief.pdf","mime":"application/pdf","content_base64":"<base64>","size":284117}]}},"envelope":{"event_id":"1c124bc5-56d9-4ef9-bbc1-9ec1be97b22f","id":"1c124bc5-56d9-4ef9-bbc1-9ec1be97b22f","type":"email.received","payload":{"thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","message_id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","inbound_message_id":"<cad34f2e-4af8-4130-ac4d-1a4be4e50f1a@external-domain.tld>","from":"human@example.com","to":["agent@thrd.email"],"cc":[],"subject":"Question about your API","received_at":"2026-02-13T12:40:21.221Z","text_preview":"Hi, can your agent reply with SLA details?","security":{"prompt_injection":{"engine":"deterministic-v1","score":18,"level":"low","flags":[]},"policy":{"reply":"allow","send":"allow"}},"has_attachments":true,"attachments":[{"id":"d340b3a8-b873-4a1d-8b5b-0a6e72a74d36","filename":"brief.pdf","mime":"application/pdf","size":284117,"storage_ref":"s3://thrd-bucket/tnt_123/d340b3a8-b873-4a1d-8b5b-0a6e72a74d36.pdf","transfer":"uri"}]},"cursor":"792","cursor_seq":"792","created_at":"2026-02-13T12:40:21.221Z"},"events_poll_non_empty":{"events":[{"event_id":"1c124bc5-56d9-4ef9-bbc1-9ec1be97b22f","id":"1c124bc5-56d9-4ef9-bbc1-9ec1be97b22f","type":"email.received","payload":{"thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","message_id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","inbound_message_id":"<cad34f2e-4af8-4130-ac4d-1a4be4e50f1a@external-domain.tld>","from":"human@example.com","to":["agent@thrd.email"],"cc":[],"subject":"Question about your API","received_at":"2026-02-13T12:40:21.221Z","text_preview":"Hi, can your agent reply with SLA details?","security":{"prompt_injection":{"engine":"deterministic-v1","score":18,"level":"low","flags":[]},"policy":{"reply":"allow","send":"allow"}},"has_attachments":true,"attachments":[{"id":"d340b3a8-b873-4a1d-8b5b-0a6e72a74d36","filename":"brief.pdf","mime":"application/pdf","size":284117,"storage_ref":"s3://thrd-bucket/tnt_123/d340b3a8-b873-4a1d-8b5b-0a6e72a74d36.pdf","transfer":"uri"}]},"cursor":"792","cursor_seq":"792","created_at":"2026-02-13T12:40:21.221Z"},{"event_id":"359ab932-df08-4bfb-a658-2cff615f550c","id":"359ab932-df08-4bfb-a658-2cff615f550c","type":"send.sent","payload":{"outbound_request_id":"649f5a72-a714-4fa7-9c69-0f8ca1f6686b","thread_id":"197ba6a6-d69f-42af-b29a-2de8d4017692","message_id":"be3859ba-8f47-463b-a763-c4269e9754b2","to":"lead@example.com"},"cursor":"793","cursor_seq":"793","created_at":"2026-02-13T12:40:23.115Z"}],"next_cursor":"793"},"events_poll_empty":{"events":[],"next_cursor":"793"},"events_ack":{"ok":true},"thread_messages":{"thread":{"id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","tenantId":"tnt_123","inboxId":"ibx_123","subjectNorm":"question about your api","lastMessageAt":"2026-02-13T12:40:21.221Z","createdAt":"2026-02-13T12:39:01.000Z"},"messages":[{"id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","direction":"inbound","messageId":"<cad34f2e-4af8-4130-ac4d-1a4be4e50f1a@external-domain.tld>","fromAddr":"human@example.com","toAddrsJson":["agent@thrd.email"],"subject":"Question about your API","text":"Hi, can your agent reply with SLA details?","attachments":[{"id":"d340b3a8-b873-4a1d-8b5b-0a6e72a74d36","filename":"brief.pdf","mime":"application/pdf","size":284117,"storageRef":"s3://thrd-bucket/tnt_123/d340b3a8-b873-4a1d-8b5b-0a6e72a74d36.pdf","createdAt":"2026-02-13T12:40:21.221Z"}],"message_security":{"engine":"deterministic-v1","score":18,"level":"low","flags":[],"policy":{"reply":"allow","send":"allow"},"created_at":"2026-02-13T12:40:21.221Z"}}]},"outbound_accepted":{"request_id":"649f5a72-a714-4fa7-9c69-0f8ca1f6686b","status":"pending","usage":{"plan":"sandbox","tier":"tier_1","starter_active":false,"monthly":{"limit":100,"used":72,"remaining":28,"ratio":0.72,"state":"ok","warning_threshold_ratio":0.8,"warning_threshold_units":80,"window_start":"2026-02-01T00:00:00.000Z","window_end":"2026-03-01T00:00:00.000Z","reset_at":"2026-03-01T00:00:00.000Z"},"upgrade_offer":{"kind":"sandbox_starter","plan":"sandbox","price_eur_month":9,"monthly_limit":2000},"upgrade_plan":"sandbox"}},"outbound_status":{"request_id":"649f5a72-a714-4fa7-9c69-0f8ca1f6686b","request_type":"reply","status":"failed","failure_reason":"mailgun_send_failed:401:Forbidden","message_id":"be3859ba-8f47-463b-a763-c4269e9754b2","created_at":"2026-02-13T12:40:21.221Z","processed_at":"2026-02-13T12:40:25.311Z"},"inbound_accepted":{"ingest_id":"03f4eb53-a7d9-4a45-8c08-c9e09542875e"},"onboarding_instant":{"tenant":{"id":"d31ce13a-8a62-4f8f-8f39-74834f1097c7","name":"Acme AI Ops","plan":"sandbox"},"agent":{"id":"d739531b-c1bd-4944-8ef8-1dc8e7ce0494","name":"Acme Primary Agent"},"inbox":{"id":"84f67408-f995-43d6-ae14-5948fc610b2d","address":"acme-agent-3f23@thrd.email"},"api_key":"thrd.ab12cd34.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","scopes":["threads:read","events:read","events:ack","messages:reply"],"machine_bootstrap":{"api_base_url":"https://api.thrd.email","openapi":"GET /openapi.json","poll_events":"GET /v1/events?cursor=0&timeout=25000","ack_events":"POST /v1/events/ack","reply":"POST /v1/reply"}},"common_errors":{"unauthorized":{"error":"unauthorized"},"forbidden_scope":{"error":"insufficient_scope"},"idempotency_required":{"error":"idempotency_key_required"},"idempotency_invalid_format":{"error":"idempotency_key_invalid_format","expected":"8-128 chars; regex ^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$"},"idempotency_mismatch":{"error":"idempotency_key_reused_with_different_payload"},"rate_limited":{"error":"rate_limited"},"plan_blocked":{"error":"plan_not_allowed_for_send"},"monthly_limit_reached":{"error":"monthly_limit_reached","usage":{"plan":"sandbox","tier":"tier_1","starter_active":false,"monthly":{"limit":100,"used":100,"remaining":0,"ratio":1,"state":"limit_reached","warning_threshold_ratio":0.8,"warning_threshold_units":80,"window_start":"2026-02-01T00:00:00.000Z","window_end":"2026-03-01T00:00:00.000Z","reset_at":"2026-03-01T00:00:00.000Z"},"upgrade_offer":{"kind":"sandbox_starter","plan":"sandbox","price_eur_month":9,"monthly_limit":2000},"upgrade_plan":"sandbox"}},"sandbox_starter_already_active":{"error":"sandbox_starter_already_active","current":"sandbox","requested":"sandbox"},"plan_downgrade_not_supported":{"error":"plan_downgrade_not_supported","current":"limited","requested":"sandbox"},"human_claim_required":{"error":"human_claim_required","provider":"x","claim_start_endpoint":"POST /v1/claim/x/start"},"security_ack_required":{"error":"security_ack_required","action":"reply","level":"high"},"security_ack_invalid":{"error":"security_ack_invalid","reason":"invalid_signature"},"security_ack_expired":{"error":"security_ack_expired"},"security_ack_context_mismatch":{"error":"security_ack_context_mismatch"},"inbound_prompt_injection_risk":{"error":"inbound_prompt_injection_risk","action":"reply","level":"critical","message_id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","flags":["secret_exfil_request"]}},"billing_checkout_self":{"checkout_url":"https://checkout.paddle.com/checkout/xxxxxxxxxxxxxxxx","session_id":"chk_XXXXXXXXXXXXXXXXXXXXXXXX"},"claim_x_start":{"provider":"x","claim_url":"https://thrd.email/claim/x/thrd_claim_token_XXXXXXXXXXXXXXXX","challenge":"thrd-claim:XXXXXXXXXXXX","suggested_post":"I'm the human responsible for this THRD agent tenant.\n\nthrd-claim:XXXXXXXXXXXX\n\n/machine https://thrd.email/machine","expires_at":"2026-02-14T18:30:00.000Z"},"claim_x_status_verified":{"provider":"x","status":"verified","verified_at":"2026-02-14T18:03:11.000Z","x_username":"example_user","tweet_id":"1880000000000000000"},"claim_x_public_pending":{"provider":"x","status":"pending","challenge":"thrd-claim:XXXXXXXXXXXX","suggested_post":"I'm the human responsible for this THRD agent tenant.\n\nthrd-claim:XXXXXXXXXXXX\n\n/machine https://thrd.email/machine","expires_at":"2026-02-14T18:30:00.000Z","verified_at":null,"x_username":null,"tweet_id":null},"por_required":{"error":"por_required","purpose":"tier3_cold_outbound","challenge":{"por_token":"por_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","prompt":"Proof of Reasoning required (tier3 cold outbound).\\nWords: agent inbox trust policy domain\\nDigits: 123456\\n\\nAnswer format: \"<letters>-<sum>\".\\nSteps: sort words alphabetically; take the first letter of each sorted word; append \"-\" + sum of all digits.","expires_at":"2026-02-14T18:40:00.000Z"}},"trust_score":{"score":78,"factors":{"human_claim_verified":true,"domain_verified":true,"subscription_active":true,"account_age_days":12,"last_30d":{"sent":120,"failed":2,"blocked":3,"quarantined":1,"por_ok":9,"por_fail":1,"feedback_useful":4,"feedback_spam":1,"feedback_block":0}}},"usage":{"plan":"sandbox","tier":"tier_1","starter_active":false,"monthly":{"limit":100,"used":72,"remaining":28,"ratio":0.72,"state":"ok","warning_threshold_ratio":0.8,"warning_threshold_units":80,"window_start":"2026-02-01T00:00:00.000Z","window_end":"2026-03-01T00:00:00.000Z","reset_at":"2026-03-01T00:00:00.000Z"},"upgrade_offer":{"kind":"sandbox_starter","plan":"sandbox","price_eur_month":9,"monthly_limit":2000},"upgrade_plan":"sandbox"},"wake_webhook":{"id":"8a18cb97-fd69-4716-a7e7-b9183928295d","url":"https://agent-runtime.example.com/thrd/wake","enabled":true,"pending_notification":false,"last_queued_at":"2026-02-16T14:50:00.000Z","last_delivered_at":"2026-02-16T14:50:01.000Z","last_error":null,"created_at":"2026-02-16T13:00:00.000Z","updated_at":"2026-02-16T14:50:01.000Z","signature":{"algorithm":"hmac-sha256","format":"x-thrd-signature: v1=<hex_hmac_sha256(timestamp + '.' + raw_body)>","timestamp_header":"x-thrd-timestamp"}},"wake_webhook_upsert":{"webhook":{"id":"8a18cb97-fd69-4716-a7e7-b9183928295d","url":"https://agent-runtime.example.com/thrd/wake","enabled":true,"pending_notification":false,"last_queued_at":null,"last_delivered_at":null,"last_error":null,"created_at":"2026-02-16T13:00:00.000Z","updated_at":"2026-02-16T13:00:00.000Z","signature":{"algorithm":"hmac-sha256","format":"x-thrd-signature: v1=<hex_hmac_sha256(timestamp + '.' + raw_body)>","timestamp_header":"x-thrd-timestamp"}},"signing_secret":"whsec_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","secret_rotated":true},"wake_payload":{"type":"inbox.pending","version":"2026-02-16","delivery_id":"wake_1739710200000_8a18cb97","tenant_id":"d31ce13a-8a62-4f8f-8f39-74834f1097c7","agent_id":"d739531b-c1bd-4944-8ef8-1dc8e7ce0494","inbox_id":"84f67408-f995-43d6-ae14-5948fc610b2d","reason":"email.received","message_id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","created_at":"2026-02-16T14:50:00.000Z","hint":{"poll_endpoint":"GET /v1/events","ack_endpoint":"POST /v1/events/ack"}},"message_security":{"message_id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","engine":"deterministic-v1","score":72,"level":"high","flags":["role_override_attempt","secret_exfil_request"],"policy":{"reply":"require_ack","send":"require_ack"},"created_at":"2026-02-13T12:40:21.221Z"},"security_ack":{"ack_token":"sec1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXX","expires_at":"2026-02-13T12:55:21.221Z","bound_to":{"message_id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","action":"reply","thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e"}},"event_types":{"email.received":{"thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","message_id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","inbound_message_id":"<cad34f2e-4af8-4130-ac4d-1a4be4e50f1a@external-domain.tld>","from":"human@example.com","to":["agent@thrd.email"],"cc":[],"subject":"Question about your API","received_at":"2026-02-13T12:40:21.221Z","text_preview":"Hi, can your agent reply with SLA details?","security":{"prompt_injection":{"engine":"deterministic-v1","score":18,"level":"low","flags":[]},"policy":{"reply":"allow","send":"allow"}},"has_attachments":true,"attachments":[{"id":"d340b3a8-b873-4a1d-8b5b-0a6e72a74d36","filename":"brief.pdf","mime":"application/pdf","size":284117,"storage_ref":"s3://thrd-bucket/tnt_123/d340b3a8-b873-4a1d-8b5b-0a6e72a74d36.pdf","transfer":"uri"}]},"reply.sent":{"outbound_request_id":"3f90a995-dbf4-4cca-bf36-1fdb84724761","thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","message_id":"f5a0d3ad-780f-49f3-b629-8f53fbf6f8cf","to":"human@example.com"},"reply.blocked":{"outbound_request_id":"3f90a995-dbf4-4cca-bf36-1fdb84724761","thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","reason":"recipient_not_thread_participant"},"reply.quarantined":{"outbound_request_id":"3f90a995-dbf4-4cca-bf36-1fdb84724761","thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","reason":"too_many_links"},"reply.failed":{"outbound_request_id":"3f90a995-dbf4-4cca-bf36-1fdb84724761","thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","message_id":"f5a0d3ad-780f-49f3-b629-8f53fbf6f8cf","reason":"mailgun_send_failed:401:Forbidden"},"send.requested":{"outbound_request_id":"649f5a72-a714-4fa7-9c69-0f8ca1f6686b","to":"lead@example.com","subject":"Partnership idea"},"send.sent":{"outbound_request_id":"649f5a72-a714-4fa7-9c69-0f8ca1f6686b","thread_id":"197ba6a6-d69f-42af-b29a-2de8d4017692","message_id":"be3859ba-8f47-463b-a763-c4269e9754b2","to":"lead@example.com"},"send.blocked":{"outbound_request_id":"649f5a72-a714-4fa7-9c69-0f8ca1f6686b","to":"lead@example.com","reason":"recipient_not_allowlisted_or_related","risk_score":70},"send.quarantined":{"outbound_request_id":"649f5a72-a714-4fa7-9c69-0f8ca1f6686b","to":"lead@example.com","reason":"risk_score_too_high","risk_score":91},"send.failed":{"outbound_request_id":"649f5a72-a714-4fa7-9c69-0f8ca1f6686b","thread_id":"197ba6a6-d69f-42af-b29a-2de8d4017692","message_id":"be3859ba-8f47-463b-a763-c4269e9754b2","to":"lead@example.com","reason":"mailgun_send_failed:401:Forbidden"},"feedback.received":{"message_id":"be3859ba-8f47-463b-a763-c4269e9754b2","thread_id":"197ba6a6-d69f-42af-b29a-2de8d4017692","action":"spam","recommended_actions":{"add_suppression":{"kind":"complaint","value":"lead@example.com","created":true}}},"suppression.added":{"kind":"complaint","value":"lead@example.com","source":"feedback","action":"spam","message_id":"be3859ba-8f47-463b-a763-c4269e9754b2","thread_id":"197ba6a6-d69f-42af-b29a-2de8d4017692"},"security.warning":{"action":"reply","message_id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","level":"medium","score":45,"flags":["authority_urgent_spoof"]},"security.ack.created":{"message_id":"1e8ebc9d-c5e7-4f2d-8217-a67cb1c83d42","action":"reply","thread_id":"031830f3-27b0-4b3b-a8f2-e4235ce5d90e","level":"high","expires_at":"2026-02-13T12:55:21.221Z"}}}