Functions

Send a test invocation

Changed on

Sends a real test email from a Primitive-controlled sender to a local-part on one of the org's verified inbound domains. By default the recipient is a synthetic __primitive_function_test+<random>@<domain> address on a domain selected to route to the function. Scoped functions use their scoped domain; fallback functions use a domain that has no enabled domain-scoped endpoint. Pass local_part to override and exercise routing logic that branches on a specific recipient (the common pattern when one function handles multiple inboxes like summarize@ and action@). The function fires through the normal MX delivery path, so reply / send-mail calls from inside the handler against the inbound's email.id work the same as in production. Returns immediately after the send is queued; the invocation appears on the function's invocations list within a few seconds.

Requires that the function is currently deployed. Returns 422 if the function is in pending or failed state, or if the org has no verified inbound domain to receive the test mail. Returns 400 if local_part is set to a value that does not match the local-part character set.

post/functions/{id}/test

Request

  • Base URL
    https://api.primitive.dev/v1
  • URL
    https://api.primitive.dev/v1/functions/{id}/test
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring

Optional client-supplied idempotency key. Retrying a request with the same key returns the original result instead of performing the action a second time; if omitted the server derives one from the canonical payload hash. Safe to retry network failures without duplicating side effects.

Request body

local_partstring

Override the synthetic local-part. When set, the test email is sent to <local_part>@<picked-domain> instead of the default __primitive_function_test+<random>@<picked-domain>. Must start with an alphanumeric and contain only letters, digits, dots, plus signs, hyphens, or underscores; 1-64 characters total.

Example request

{
  "local_part": "summarize"
}

Response

Test send queued

successtrue required

Changes

    • warning

      added the new access_mode_unavailable enum value to the / response property for the response status

    • warning

      added the new access_mode_unavailable enum value to the / response property for the response status

    • warning

      added the new access_mode_unavailable enum value to the / response property for the response status

    • warning

      added the new access_mode_unavailable enum value to the / response property for the response status

    • warning

      added the new access_mode_unavailable enum value to the / response property for the response status

    • warning

      added the new access_mode_unavailable enum value to the / response property for the response status

    • warning

      added the new builtin_role enum value to the / response property for the response status

    • warning

      added the new builtin_role enum value to the / response property for the response status

    • warning

      added the new builtin_role enum value to the / response property for the response status

    • warning

      added the new builtin_role enum value to the / response property for the response status

    • warning

      added the new builtin_role enum value to the / response property for the response status

    • warning

      added the new builtin_role enum value to the / response property for the response status

    • warning

      added the new cleanup_incomplete enum value to the / response property for the response status

    • warning

      added the new cleanup_incomplete enum value to the / response property for the response status

    • warning

      added the new cleanup_incomplete enum value to the / response property for the response status

    • warning

      added the new cleanup_incomplete enum value to the / response property for the response status

    • warning

      added the new cleanup_incomplete enum value to the / response property for the response status

    • warning

      added the new cleanup_incomplete enum value to the / response property for the response status

    • warning

      added the new cli_access_refused enum value to the / response property for the response status

    • warning

      added the new cli_access_refused enum value to the / response property for the response status

    • warning

      added the new cli_access_refused enum value to the / response property for the response status

    • warning

      added the new cli_access_refused enum value to the / response property for the response status

    • warning

      added the new cli_access_refused enum value to the / response property for the response status

    • warning

      added the new cli_access_refused enum value to the / response property for the response status

    • warning

      added the new confirmation_required enum value to the / response property for the response status

    • warning

      added the new confirmation_required enum value to the / response property for the response status

    • warning

      added the new confirmation_required enum value to the / response property for the response status

    • warning

      added the new confirmation_required enum value to the / response property for the response status

    • warning

      added the new confirmation_required enum value to the / response property for the response status

    • warning

      added the new confirmation_required enum value to the / response property for the response status

    • warning

      added the new connection_owner_address_required enum value to the / response property for the response status

    • warning

      added the new connection_owner_address_required enum value to the / response property for the response status

    • warning

      added the new connection_owner_address_required enum value to the / response property for the response status

    • warning

      added the new connection_owner_address_required enum value to the / response property for the response status

    • warning

      added the new connection_owner_address_required enum value to the / response property for the response status

    • warning

      added the new connection_owner_address_required enum value to the / response property for the response status

    • warning

      added the new email_rule_author_only enum value to the / response property for the response status

    • warning

      added the new email_rule_author_only enum value to the / response property for the response status

    • warning

      added the new email_rule_author_only enum value to the / response property for the response status

    • warning

      added the new email_rule_author_only enum value to the / response property for the response status

    • warning

      added the new email_rule_author_only enum value to the / response property for the response status

    • warning

      added the new email_rule_author_only enum value to the / response property for the response status

    • warning

      added the new email_rule_compiler_unavailable enum value to the / response property for the response status

    • warning

      added the new email_rule_compiler_unavailable enum value to the / response property for the response status

    • warning

      added the new email_rule_compiler_unavailable enum value to the / response property for the response status

    • warning

      added the new email_rule_compiler_unavailable enum value to the / response property for the response status

    • warning

      added the new email_rule_compiler_unavailable enum value to the / response property for the response status

    • warning

      added the new email_rule_compiler_unavailable enum value to the / response property for the response status

    • warning

      added the new email_rule_conflict enum value to the / response property for the response status

    • warning

      added the new email_rule_conflict enum value to the / response property for the response status

    • warning

      added the new email_rule_conflict enum value to the / response property for the response status

    • warning

      added the new email_rule_conflict enum value to the / response property for the response status

    • warning

      added the new email_rule_conflict enum value to the / response property for the response status

    • warning

      added the new email_rule_conflict enum value to the / response property for the response status

    • warning

      added the new email_rule_not_compiled enum value to the / response property for the response status

    • warning

      added the new email_rule_not_compiled enum value to the / response property for the response status

    • warning

      added the new email_rule_not_compiled enum value to the / response property for the response status

    • warning

      added the new email_rule_not_compiled enum value to the / response property for the response status

    • warning

      added the new email_rule_not_compiled enum value to the / response property for the response status

    • warning

      added the new email_rule_not_compiled enum value to the / response property for the response status

    • warning

      added the new grant_forbidden enum value to the / response property for the response status

    • warning

      added the new grant_forbidden enum value to the / response property for the response status

    • warning

      added the new grant_forbidden enum value to the / response property for the response status

    • warning

      added the new grant_forbidden enum value to the / response property for the response status

    • warning

      added the new grant_forbidden enum value to the / response property for the response status

    • warning

      added the new grant_forbidden enum value to the / response property for the response status

    • warning

      added the new keep_refused enum value to the / response property for the response status

    • warning

      added the new keep_refused enum value to the / response property for the response status

    • warning

      added the new keep_refused enum value to the / response property for the response status

    • warning

      added the new keep_refused enum value to the / response property for the response status

    • warning

      added the new keep_refused enum value to the / response property for the response status

    • warning

      added the new keep_refused enum value to the / response property for the response status

    • warning

      added the new last_owner enum value to the / response property for the response status

    • warning

      added the new last_owner enum value to the / response property for the response status

    • warning

      added the new last_owner enum value to the / response property for the response status

    • warning

      added the new last_owner enum value to the / response property for the response status

    • warning

      added the new last_owner enum value to the / response property for the response status

    • warning

      added the new last_owner enum value to the / response property for the response status

    • warning

      added the new mailbox_not_claimable enum value to the / response property for the response status

    • warning

      added the new mailbox_not_claimable enum value to the / response property for the response status

    • warning

      added the new mailbox_not_claimable enum value to the / response property for the response status

    • warning

      added the new mailbox_not_claimable enum value to the / response property for the response status

    • warning

      added the new mailbox_not_claimable enum value to the / response property for the response status

    • warning

      added the new mailbox_not_claimable enum value to the / response property for the response status

    • warning

      added the new mailbox_shared_with_others enum value to the / response property for the response status

    • warning

      added the new mailbox_shared_with_others enum value to the / response property for the response status

    • warning

      added the new mailbox_shared_with_others enum value to the / response property for the response status

    • warning

      added the new mailbox_shared_with_others enum value to the / response property for the response status

    • warning

      added the new mailbox_shared_with_others enum value to the / response property for the response status

    • warning

      added the new mailbox_shared_with_others enum value to the / response property for the response status

    • warning

      added the new member_address_reserved enum value to the / response property for the response status

    • warning

      added the new member_address_reserved enum value to the / response property for the response status

    • warning

      added the new member_address_reserved enum value to the / response property for the response status

    • warning

      added the new member_address_reserved enum value to the / response property for the response status

    • warning

      added the new member_address_reserved enum value to the / response property for the response status

    • warning

      added the new member_address_reserved enum value to the / response property for the response status

    • warning

      added the new plan_required enum value to the / response property for the response status

    • warning

      added the new plan_required enum value to the / response property for the response status

    • warning

      added the new plan_required enum value to the / response property for the response status

    • warning

      added the new plan_required enum value to the / response property for the response status

    • warning

      added the new plan_required enum value to the / response property for the response status

    • warning

      added the new plan_required enum value to the / response property for the response status

    • warning

      added the new redeploy_failed enum value to the / response property for the response status

    • warning

      added the new redeploy_failed enum value to the / response property for the response status

    • warning

      added the new redeploy_failed enum value to the / response property for the response status

    • warning

      added the new redeploy_failed enum value to the / response property for the response status

    • warning

      added the new redeploy_failed enum value to the / response property for the response status

    • warning

      added the new redeploy_failed enum value to the / response property for the response status

    • warning

      added the new removal_failed enum value to the / response property for the response status

    • warning

      added the new removal_failed enum value to the / response property for the response status

    • warning

      added the new removal_failed enum value to the / response property for the response status

    • warning

      added the new removal_failed enum value to the / response property for the response status

    • warning

      added the new removal_failed enum value to the / response property for the response status

    • warning

      added the new removal_failed enum value to the / response property for the response status

    • warning

      added the new removal_timeout enum value to the / response property for the response status

    • warning

      added the new removal_timeout enum value to the / response property for the response status

    • warning

      added the new removal_timeout enum value to the / response property for the response status

    • warning

      added the new removal_timeout enum value to the / response property for the response status

    • warning

      added the new removal_timeout enum value to the / response property for the response status

    • warning

      added the new removal_timeout enum value to the / response property for the response status

    • warning

      added the new role_assigned enum value to the / response property for the response status

    • warning

      added the new role_assigned enum value to the / response property for the response status

    • warning

      added the new role_assigned enum value to the / response property for the response status

    • warning

      added the new role_assigned enum value to the / response property for the response status

    • warning

      added the new role_assigned enum value to the / response property for the response status

    • warning

      added the new role_assigned enum value to the / response property for the response status

    • warning

      added the new role_assignment_unavailable enum value to the / response property for the response status

    • warning

      added the new role_assignment_unavailable enum value to the / response property for the response status

    • warning

      added the new role_assignment_unavailable enum value to the / response property for the response status

    • warning

      added the new role_assignment_unavailable enum value to the / response property for the response status

    • warning

      added the new role_assignment_unavailable enum value to the / response property for the response status

    • warning

      added the new role_assignment_unavailable enum value to the / response property for the response status

    • warning

      added the new role_key_taken enum value to the / response property for the response status

    • warning

      added the new role_key_taken enum value to the / response property for the response status

    • warning

      added the new role_key_taken enum value to the / response property for the response status

    • warning

      added the new role_key_taken enum value to the / response property for the response status

    • warning

      added the new role_key_taken enum value to the / response property for the response status

    • warning

      added the new role_key_taken enum value to the / response property for the response status

    • warning

      added the new rotation_in_progress enum value to the / response property for the response status

    • warning

      added the new rotation_in_progress enum value to the / response property for the response status

    • warning

      added the new rotation_in_progress enum value to the / response property for the response status

    • warning

      added the new rotation_in_progress enum value to the / response property for the response status

    • warning

      added the new rotation_in_progress enum value to the / response property for the response status

    • warning

      added the new rotation_in_progress enum value to the / response property for the response status

    • warning

      added the new rotation_incomplete enum value to the / response property for the response status

    • warning

      added the new rotation_incomplete enum value to the / response property for the response status

    • warning

      added the new rotation_incomplete enum value to the / response property for the response status

    • warning

      added the new rotation_incomplete enum value to the / response property for the response status

    • warning

      added the new rotation_incomplete enum value to the / response property for the response status

    • warning

      added the new rotation_incomplete enum value to the / response property for the response status

    • warning

      added the new step_up_invalid enum value to the / response property for the response status

    • warning

      added the new step_up_invalid enum value to the / response property for the response status

    • warning

      added the new step_up_invalid enum value to the / response property for the response status

    • warning

      added the new step_up_invalid enum value to the / response property for the response status

    • warning

      added the new step_up_invalid enum value to the / response property for the response status

    • warning

      added the new step_up_invalid enum value to the / response property for the response status

    • warning

      added the new step_up_not_accepted enum value to the / response property for the response status

    • warning

      added the new step_up_not_accepted enum value to the / response property for the response status

    • warning

      added the new step_up_not_accepted enum value to the / response property for the response status

    • warning

      added the new step_up_not_accepted enum value to the / response property for the response status

    • warning

      added the new step_up_not_accepted enum value to the / response property for the response status

    • warning

      added the new step_up_not_accepted enum value to the / response property for the response status

    • warning

      added the new step_up_refused enum value to the / response property for the response status

    • warning

      added the new step_up_refused enum value to the / response property for the response status

    • warning

      added the new step_up_refused enum value to the / response property for the response status

    • warning

      added the new step_up_refused enum value to the / response property for the response status

    • warning

      added the new step_up_refused enum value to the / response property for the response status

    • warning

      added the new step_up_refused enum value to the / response property for the response status

    • warning

      added the new step_up_required enum value to the / response property for the response status

    • warning

      added the new step_up_required enum value to the / response property for the response status

    • warning

      added the new step_up_required enum value to the / response property for the response status

    • warning

      added the new step_up_required enum value to the / response property for the response status

    • warning

      added the new step_up_required enum value to the / response property for the response status

    • warning

      added the new step_up_required enum value to the / response property for the response status

    • warning

      added the new template_role enum value to the / response property for the response status

    • warning

      added the new template_role enum value to the / response property for the response status

    • warning

      added the new template_role enum value to the / response property for the response status

    • warning

      added the new template_role enum value to the / response property for the response status

    • warning

      added the new template_role enum value to the / response property for the response status

    • warning

      added the new template_role enum value to the / response property for the response status

    • warning

      added the new upstream_unavailable enum value to the / response property for the response status

    • warning

      added the new upstream_unavailable enum value to the / response property for the response status

    • warning

      added the new upstream_unavailable enum value to the / response property for the response status

    • warning

      added the new upstream_unavailable enum value to the / response property for the response status

    • warning

      added the new upstream_unavailable enum value to the / response property for the response status

    • warning

      added the new upstream_unavailable enum value to the / response property for the response status

    This list may be incomplete.

    • warning

      added the new agent_changed enum value to the / response property for the response status

    • warning

      added the new agent_changed enum value to the / response property for the response status

    • warning

      added the new agent_changed enum value to the / response property for the response status

    • warning

      added the new agent_changed enum value to the / response property for the response status

    • warning

      added the new agent_changed enum value to the / response property for the response status

    • warning

      added the new agent_changed enum value to the / response property for the response status

    • warning

      added the new agent_limit enum value to the / response property for the response status

    • warning

      added the new agent_limit enum value to the / response property for the response status

    • warning

      added the new agent_limit enum value to the / response property for the response status

    • warning

      added the new agent_limit enum value to the / response property for the response status

    • warning

      added the new agent_limit enum value to the / response property for the response status

    • warning

      added the new agent_limit enum value to the / response property for the response status

    • warning

      added the new already_member enum value to the / response property for the response status

    • warning

      added the new already_member enum value to the / response property for the response status

    • warning

      added the new already_member enum value to the / response property for the response status

    • warning

      added the new already_member enum value to the / response property for the response status

    • warning

      added the new already_member enum value to the / response property for the response status

    • warning

      added the new already_member enum value to the / response property for the response status

    • warning

      added the new directory_limit enum value to the / response property for the response status

    • warning

      added the new directory_limit enum value to the / response property for the response status

    • warning

      added the new directory_limit enum value to the / response property for the response status

    • warning

      added the new directory_limit enum value to the / response property for the response status

    • warning

      added the new directory_limit enum value to the / response property for the response status

    • warning

      added the new directory_limit enum value to the / response property for the response status

    • warning

      added the new invitation_accepted enum value to the / response property for the response status

    • warning

      added the new invitation_accepted enum value to the / response property for the response status

    • warning

      added the new invitation_accepted enum value to the / response property for the response status

    • warning

      added the new invitation_accepted enum value to the / response property for the response status

    • warning

      added the new invitation_accepted enum value to the / response property for the response status

    • warning

      added the new invitation_accepted enum value to the / response property for the response status

    • warning

      added the new invitation_changed enum value to the / response property for the response status

    • warning

      added the new invitation_changed enum value to the / response property for the response status

    • warning

      added the new invitation_changed enum value to the / response property for the response status

    • warning

      added the new invitation_changed enum value to the / response property for the response status

    • warning

      added the new invitation_changed enum value to the / response property for the response status

    • warning

      added the new invitation_changed enum value to the / response property for the response status

    • warning

      added the new invitation_pending enum value to the / response property for the response status

    • warning

      added the new invitation_pending enum value to the / response property for the response status

    • warning

      added the new invitation_pending enum value to the / response property for the response status

    • warning

      added the new invitation_pending enum value to the / response property for the response status

    • warning

      added the new invitation_pending enum value to the / response property for the response status

    • warning

      added the new invitation_pending enum value to the / response property for the response status

    • warning

      added the new invitation_sending enum value to the / response property for the response status

    • warning

      added the new invitation_sending enum value to the / response property for the response status

    • warning

      added the new invitation_sending enum value to the / response property for the response status

    • warning

      added the new invitation_sending enum value to the / response property for the response status

    • warning

      added the new invitation_sending enum value to the / response property for the response status

    • warning

      added the new invitation_sending enum value to the / response property for the response status

    • warning

      added the new invitation_unconfirmed enum value to the / response property for the response status

    • warning

      added the new invitation_unconfirmed enum value to the / response property for the response status

    • warning

      added the new invitation_unconfirmed enum value to the / response property for the response status

    • warning

      added the new invitation_unconfirmed enum value to the / response property for the response status

    • warning

      added the new invitation_unconfirmed enum value to the / response property for the response status

    • warning

      added the new invitation_unconfirmed enum value to the / response property for the response status

    • warning

      added the new invitations_pending enum value to the / response property for the response status

    • warning

      added the new invitations_pending enum value to the / response property for the response status

    • warning

      added the new invitations_pending enum value to the / response property for the response status

    • warning

      added the new invitations_pending enum value to the / response property for the response status

    • warning

      added the new invitations_pending enum value to the / response property for the response status

    • warning

      added the new invitations_pending enum value to the / response property for the response status

    • warning

      added the new member_changed enum value to the / response property for the response status

    • warning

      added the new member_changed enum value to the / response property for the response status

    • warning

      added the new member_changed enum value to the / response property for the response status

    • warning

      added the new member_changed enum value to the / response property for the response status

    • warning

      added the new member_changed enum value to the / response property for the response status

    • warning

      added the new member_changed enum value to the / response property for the response status

    • warning

      added the new project_changed enum value to the / response property for the response status

    • warning

      added the new project_changed enum value to the / response property for the response status

    • warning

      added the new project_changed enum value to the / response property for the response status

    • warning

      added the new project_changed enum value to the / response property for the response status

    • warning

      added the new project_changed enum value to the / response property for the response status

    • warning

      added the new project_changed enum value to the / response property for the response status

    • warning

      added the new recipient_changed enum value to the / response property for the response status

    • warning

      added the new recipient_changed enum value to the / response property for the response status

    • warning

      added the new recipient_changed enum value to the / response property for the response status

    • warning

      added the new recipient_changed enum value to the / response property for the response status

    • warning

      added the new recipient_changed enum value to the / response property for the response status

    • warning

      added the new recipient_changed enum value to the / response property for the response status