{"openapi":"3.1.0","info":{"title":"AgentPixel API","version":"1.0.0","description":"Consent-first website pixel for AI agents. Start a 30-day trial (no card), create a pixel, configure the consent bar, verify the install and read contacts. Authenticate with `Authorization: Bearer <key>` or `X-API-Key: <key>`. The same features are available as an MCP server at https://agentpixel.io/mcp. Full guide: https://agentpixel.io/docs","termsOfService":"https://allsourcedata.io/terms","contact":{"name":"AgentPixel support","email":"joey@allsourcedata.io","url":"https://agentpixel.io/docs"},"x-logo":{"url":"https://raw.githubusercontent.com/byron-allsourcedata/agentpixel-mcp/main/logo.png"}},"servers":[{"url":"https://agentpixel.io"}],"externalDocs":{"url":"https://agentpixel.io/docs"},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/plans":{"get":{"summary":"Plans","operationId":"plans_v1_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/accounts":{"post":{"summary":"Create Account","operationId":"create_account_v1_accounts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/confirm":{"post":{"summary":"Confirm With Code","description":"Confirm the email with the 6-digit code. With a valid signup token, the first\nconfirmation also returns the API key, so the agent saves a call.","operationId":"confirm_with_code_v1_accounts__account_id__confirm_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signup/resend-code":{"post":{"summary":"Resend Code","description":"Send a fresh code (and link) to the email of an existing account. Works\nwithout a signup token. 1 per minute, 5 per day.","operationId":"resend_code_v1_signup_resend_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/signup-token":{"post":{"summary":"Reissue Signup Token","description":"New signup token after the old one expired, proven by a fresh email code.","operationId":"reissue_signup_token_v1_accounts__account_id__signup_token_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReissueIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}":{"get":{"summary":"Account Status","operationId":"account_status_v1_accounts__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/verification-email":{"post":{"summary":"Resend Verification","operationId":"resend_verification_v1_accounts__account_id__verification_email_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accounts/{account_id}/checkout":{"post":{"summary":"Checkout","operationId":"checkout_v1_accounts__account_id__checkout_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys":{"post":{"summary":"Create Api Key","operationId":"create_api_key_v1_api_keys_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/whoami":{"get":{"summary":"Whoami","operationId":"whoami_v1_whoami_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/accounts/{account_id}/activate":{"post":{"summary":"Activate Account","description":"Mark a paid account active after payment. Does not change the plan.","operationId":"activate_account_v1_accounts__account_id__activate_post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/setup":{"get":{"summary":"Setup Status","operationId":"setup_status_v1_setup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/pixels":{"get":{"summary":"List Pixels","operationId":"list_pixels_v1_pixels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Pixel","operationId":"create_pixel_v1_pixels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PixelIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pixels/{pixel_id}":{"get":{"summary":"Get Pixel","operationId":"get_pixel_v1_pixels__pixel_id__get","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Rename Pixel","operationId":"rename_pixel_v1_pixels__pixel_id__patch","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Pixel","operationId":"delete_pixel_v1_pixels__pixel_id__delete","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pixels/{pixel_id}/check":{"post":{"summary":"Check Pixel","operationId":"check_pixel_v1_pixels__pixel_id__check_post","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pixels/{pixel_id}/snippets/{action}":{"get":{"summary":"Extra Snippet","operationId":"extra_snippet_v1_pixels__pixel_id__snippets__action__get","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}},{"name":"action","in":"path","required":true,"schema":{"type":"string","title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pixels/{pixel_id}/email-snippet":{"post":{"summary":"Email Snippet","operationId":"email_snippet_v1_pixels__pixel_id__email_snippet_post","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pixels/{pixel_id}/contacts":{"post":{"summary":"Record Contacts","operationId":"record_contacts_v1_pixels__pixel_id__contacts_post","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedBatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Pull Contacts","operationId":"pull_contacts_v1_pixels__pixel_id__contacts_get","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}},{"name":"on","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"On"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/quote":{"get":{"summary":"Billing Quote","operationId":"billing_quote_v1_billing_quote_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/sample":{"get":{"summary":"Get Sample","operationId":"get_sample_v1_sample_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/policy/{pixel_id}":{"get":{"summary":"Policy Page","operationId":"policy_page_v1_policy__pixel_id__get","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/consent/shown":{"post":{"summary":"Record Shown","description":"The cookie bar opened for a visitor. Counted once per visitor, pixel and day.","operationId":"record_shown_v1_consent_shown_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/consent/record":{"post":{"summary":"Record Consent","operationId":"record_consent_v1_consent_record_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/consent/check":{"get":{"summary":"Consent Check","operationId":"consent_check_v1_consent_check_get","parameters":[{"name":"pixel_id","in":"query","required":true,"schema":{"type":"string","title":"Pixel Id"}},{"name":"visitor_id","in":"query","required":true,"schema":{"type":"string","title":"Visitor Id"}},{"name":"required_purpose","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Purpose"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/consent/receipt":{"get":{"summary":"Consent Receipt","operationId":"consent_receipt_v1_consent_receipt_get","parameters":[{"name":"pixel_id","in":"query","required":true,"schema":{"type":"string","title":"Pixel Id"}},{"name":"visitor_id","in":"query","required":true,"schema":{"type":"string","title":"Visitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/consent/verify":{"post":{"summary":"Consent Verify","operationId":"consent_verify_v1_consent_verify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/pixels/{pixel_id}/consent":{"get":{"summary":"Consent Log","operationId":"consent_log_v1_pixels__pixel_id__consent_get","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Configure Consent","operationId":"configure_consent_v1_pixels__pixel_id__consent_post","parameters":[{"name":"pixel_id","in":"path","required":true,"schema":{"type":"string","title":"Pixel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountIn":{"properties":{"email":{"type":"string","title":"Email"},"display_name":{"type":"string","title":"Display Name"},"external_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External User Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["email","display_name"],"title":"AccountIn"},"ConfirmIn":{"properties":{"code":{"type":"string","title":"Code"},"signup_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Token"}},"type":"object","required":["code"],"title":"ConfirmIn"},"DomainPatch":{"properties":{"domain":{"type":"string","title":"Domain"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"}},"type":"object","required":["domain"],"title":"DomainPatch"},"EmailIn":{"properties":{"email":{"type":"string","title":"Email"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"}},"type":"object","required":["email"],"title":"EmailIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PixelIn":{"properties":{"domain":{"type":"string","title":"Domain"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"}},"type":"object","required":["domain"],"title":"PixelIn"},"ReissueIn":{"properties":{"email":{"type":"string","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"ReissueIn"},"ResendIn":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ResendIn"},"ResolvedBatchIn":{"properties":{"contacts":{"items":{"$ref":"#/components/schemas/ResolvedPersonIn"},"type":"array","title":"Contacts"}},"type":"object","required":["contacts"],"title":"ResolvedBatchIn"},"ResolvedPersonIn":{"properties":{"hem":{"type":"string","title":"Hem","default":""},"seen_at":{"type":"string","title":"Seen At","default":""},"contact":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Contact"}},"type":"object","title":"ResolvedPersonIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"},"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}