app2email API Tarifs

Change a submission: stage, assignee, tags, answers

PATCH https://api.app2email.com/v1/{number}/submit/submissions/{id}
autorisation : submissions:manage bac à sable : refusé MCP: update_submission

Scope: submissions:manage. Not with a sandbox key. Any of: status (a stage key; with note when the stage has require_note, else 409 stage_not_allowed), priority, assignee (a member id; 0 or null = nobody), due (null takes it off), tags / tags_add / tags_remove, answers and extra (only the keys given change, null removes one; calculated values are worked out again) and location. A note without status is written as an internal note. 400 nothing_to_change when the body names none of them; changed false when the submission already had these values. Each change is written to the activity list under the key's name. Moving to a stage sends that stage's message to the submitter, when it has one. Events: submission.status_changed, submission.assigned, submission.updated, submission.note_added, one per kind of change; the form's automations run on them.

Chemin

  • number string obligatoire pattern ^[0-9]{8,15}$

    Your app2email WhatsApp number - the number the message is sent FROM. Full number with country code, digits only.

    par ex. 4976659348270
  • id string obligatoire

    The submission's id, or its reference (MR-7Q3M2A).

    par ex. MR-7Q3M2A

Corps application/json obligatoire

  • status string

    A stage key of the submission's form.

    par ex. checked
  • note string max 4000 chars

    With status: the note of the change (needed when the stage has require_note; a stage's message can show it to the submitter as {note}). Alone: written as an internal note.

  • priority string
    lownormalhighurgent
  • assignee integer | null

    A member's id (GET /submit/members). 0 or null = nobody.

    par ex. 12
  • due string (date-time) | null

    ISO 8601. null or an empty text takes the due time off.

  • tags string[]

    ALL the tags: they replace what is there. Up to 20, 40 characters each.

  • tags_add string[]

    Tags to add.

  • tags_remove string[]

    Tags to remove.

  • answers object any keys

    Answers to change: only the keys given are changed; null removes a value. Checked like a customer's answers.

  • extra object any keys

    Internal fields and other values to change: only the keys given are changed; null removes a value.

  • location object

    Where it is: a pin and / or an address. lat and lng come together.

    4 champs

Réponses

200 Changed.
Champs
  • success boolean
  • request_id string
  • submission object

    What a person sent with a form, and everything that happened to it since. Lists carry the object up to closed; one submission (GET /submit/submissions/{id}) adds files, events, fields, stages, actions and buttons. The data of every submission.* webhook event is this object without events, fields, stages and actions.

    34 champs
    • id integer
      par ex. 4182
    • reference string

      The short code the submitter sees: the form's prefix and 6 characters. Every route that takes a submission id takes it too.

      par ex. MR-7Q3M2A
    • form object

      The form it was made with.

      2 champs
    • channel string

      whatsapp: the WhatsApp form. web: the web page. api: POST /submit/submissions. staff: entered by a team member.

      whatsappwebapistaff
    • status string

      The key of the stage it is in (the form's stages).

      par ex. received
    • status_name string
      par ex. Received
    • status_kind string
      opendonecancelled
    • status_color string
      greybluegreenamberredpurple
    • priority string
      lownormalhighurgent
    • tags string[]
    • due string (date-time) | null

      The due time, or null.

    • assignee object | null

      The member it is assigned to, or null.

      2 champs
    • contact object
      5 champs
      • identity string

        The submitter's WhatsApp number (digits, country code first) or business-scoped user id. Empty for a web submission with only an e-mail address.

        par ex. 61412345678
      • name string
      • phone string
      • email string
      • verified boolean

        true: the number is proven (sent on WhatsApp, or confirmed from the web page with one message).

    • The WhatsApp conversation. 0 when there is none.

    • answers object any keys

      What was asked: field key -> value. The value's JSON type follows the field type (text: string, number and rating: number, yesno and consent: boolean, multiselect: array of choice ids, photo and document: array of file ids, date: YYYY-MM-DD, location: the address text).

    • extra object any keys

      Everything that was not asked: internal fields, calculated values and values automations saved.

    • location object | null

      The pin the submitter sent, or null.

      4 champs
    • parent string | null

      The reference of the submission this one adds to (a follow-up form), or null.

    • summary string

      One line for lists: the first answers.

    • files_count integer
    • files_pending integer

      Files of the WhatsApp form that are still being fetched. 0 = all stored.

    • unread boolean

      New, or the submitter added something staff have not opened yet.

    • created string (date-time)
    • updated string (date-time)
    • status_changed string (date-time)
    • closed string (date-time) | null

      When it reached a done or cancelled stage, or null.

    • deleted string (date-time)

      Only on a deleted submission: when it was deleted.

    • files object[]

      One submission only (and webhook events).

      9 champs d'élément
      • id integer

        What a photo or document answer holds.

        par ex. 9917
      • field string

        The field it belongs to. Empty: added afterwards.

      • name string
      • mime string
      • size integer

        Bytes.

      • state string

        pending: still being fetched from WhatsApp. failed: could not be fetched.

        pendingstoredfailed
      • source string

        flow: the WhatsApp form. chat: sent in the chat afterwards.

        flowwebchatstaffapi
      • url string

        Fetches the file's bytes without a key. Valid for 7 days from this answer; read the submission again for a fresh one. Empty until the file is stored.

      • created string (date-time)
    • events object[]

      The activity list, oldest first. One submission only.

      7 champs d'élément
      • id integer
      • kind string
        creatededitedstatusassignedprioritytagsduenotereply_outreply_infilelocationbuttonautomationfollowupvieweddeletedrestorederror
      • actor object

        Who did it.

        3 champs
      • text string
      • data object any keys

        Details by kind, for example {from, to} of a stage change or {state: sent | held | email | failed} of a reply.

      • public boolean

        true: the submitter sees it on their status page.

      • created string (date-time)
    • fields object[]

      The form's fields, to label answers and extra. One submission only.

      8 champs d'élément
      • key string
      • label string
      • type string
        texttextareanumberemailphonedateselectmultiselectyesnoratingconsentphotodocumentlocationinfohidden
      • step string

        The key of its step. Empty for a calculated field.

      • internal boolean

        true: its value is in extra, not in answers.

      • unit string
      • choices object[]

        select and multiselect.

      • calculated boolean

        true: worked out by a formula.

    • stages object[]

      The stages it can move to. One submission only.

      7 champs d'élément
      • key string obligatoire pattern ^[a-z][a-z0-9_]{0,39}$

        The stage's name in the API (the submission's status): a lower case letter, then lower case letters, digits or _ (at most 40 characters). Unique in the form.

        par ex. received
      • name string obligatoire

        What people see, for example In review. Up to 40 characters.

        par ex. Received
      • kind string obligatoire

        open: still being worked on. done: finished well. cancelled: finished without a result. A form needs at least one open and one done stage.

        opendonecancelled
      • color string

        grey, blue, green, amber, red or purple.

        greybluegreenamberredpurple
      • set_by string[]

        The roles that may choose this stage: some of owner, admin, manager, agent, viewer. [] = anyone who may change stages. Owners, admins, automations and API keys always may.

      • require_note boolean

        true: a note must come with the move to this stage.

      • message string max 1000 chars

        Sent to the submitter when the submission arrives in this stage, up to 1,000 characters, with placeholders ({note} = the note of the change). "" = nothing is sent.

    • actions object[]

      The manual automations of its form: POST /submit/submissions/{id}/run with the id. One submission only.

      2 champs d'élément
    • buttons object[]

      Buttons sent to the submitter that they have not pressed yet. One submission only (and webhook events).

      2 champs d'élément
  • changed boolean

    PATCH only. false: the submission already had these values.

Erreurs

api_key_expiredapi_key_number_mismatchapi_key_old_formatapi_key_revokedapproval_body_too_largeblock_list_busyblock_list_fullblock_users_errorblock_users_failedbsuid_not_supportedcall_permission_requiredcaption_not_supportedcaption_too_longdaily_cap_reacheddisplay_name_not_approvedform_not_foundfree_form_single_recipientinsufficient_scopeinternal_errorinvalid_api_keyinvalid_authorization_headerinvalid_base64invalid_callback_datainvalid_contacts_messageinvalid_cursorinvalid_identity_key_hashinvalid_interactiveinvalid_jsoninvalid_locationinvalid_media_linkinvalid_memberinvalid_number_in_urlinvalid_reactioninvalid_reply_toinvalid_submissioninvalid_toip_not_allowedmarketing_disabled_on_cloud_apimarketing_per_user_limitmedia_download_errormedia_download_failedmedia_too_largemedia_type_not_allowedmedia_upload_errormedia_upload_failedmember_not_foundmessaging_limit_restrictedmissing_api_keymissing_interactivemissing_mediamissing_textmonthly_cap_reachedmonthly_limit_reachednot_available_on_personal_numbernothing_to_changenumber_already_verifiednumber_not_foundoutside_24h_windowparameter_value_invalidpersonal_number_new_chat_limitpersonal_number_not_linkedplan_not_allowedrate_limitedreaction_too_oldrecipient_identity_changedrecipient_in_experimentrecipient_is_senderrecipient_not_allowedrecipient_opted_outrecipient_stopped_marketingrecipient_unreachableregister_limit_reachedrequired_parameter_missingsandbox_keyservice_not_livestage_not_allowedsubmission_not_foundsubmit_not_enabledsubmit_not_readytemplate_disabledtemplate_format_policytemplate_not_availabletemplate_not_foundtemplate_not_marketingtemplate_parameter_count_mismatchtemplate_parameter_format_mismatchtemplate_parameter_invalidtemplate_pausedtemplate_text_too_longtext_too_longtoo_many_messages_to_recipientunsupported_message_typeusername_account_not_linkedusername_change_limitusername_not_availableusername_not_eligibleusername_takenvoice_needs_ogg_opuswhatsapp_account_lockedwhatsapp_account_restrictedwhatsapp_connection_problemwhatsapp_errorwhatsapp_maintenancewhatsapp_number_not_registeredwhatsapp_parameter_errorwhatsapp_payment_issuewhatsapp_rate_limitwhatsapp_unavailable
  • 400 The request is malformed (missing or invalid fields, query parameters or times).
  • 401 Missing, invalid, revoked or expired API key.
  • 403 The key is valid but this call is not allowed: the key lacks the scope the call needs (insufficient_scope), the address is not allowed for the key (ip_not_allowed), the number or plan does not allow it, a recipient opted out or is not opted in, or a problem with the WhatsApp account.
  • 404 The number, template, message, broadcast, webhook, delivery, opt-in, logged request, booking or Flow was not found.
  • 409 Idempotency-Key: the first request with this key is still running, or did not finish. Or a conflict: the template name exists, the webhook URL is used by another webhook, the broadcast cannot be cancelled, the booking slot is taken or the booking is already cancelled, or the Flow is not published.
  • 415 The body is not JSON.
  • 429 A monthly plan limit, the number's own monthly cap, the key's daily cap, a WhatsApp rate limit, the API rate limit (rate_limited), or the webhook test limit (too_many_tests) was reached. Retry-After and error.retry_after_seconds say how long to wait.
  • 500 Unexpected error on app2email's side.
  • 503 app2email's connection to the WhatsApp account needs attention, or the request log is not available right now.

Webhooks qu'il déclenche

Pour les agents IA

Essayez maintenant, sans compte ni personne : POST https://api.app2email.com/v1/account/sandbox (sans clé ni corps ; ou l'outil create_sandbox du serveur MCP de gestion) renvoie une clé pour un numéro WhatsApp de démonstration avec de faux clients. Envoyez un modèle, récupérez les événements avec GET /events?wait=25, répondez à la réponse du client : rien n'est envoyé à WhatsApp, et les requêtes et les réponses sont celles de la vraie API (https://www.app2email.com/docs/api/sandbox).

Déjà client : demandez au titulaire du compte le numéro (chiffres) et une clé API depuis https://www.app2email.com/dashboard/apikey (une clé de bac à sable n'envoie rien) ; transmettez-la sous la forme Authorization: Bearer <clé> au serveur MCP de messagerie ou à l'API REST ; appelez d'abord check_key, et envoyez d'abord avec dry_run.

Si vous êtes un agent IA qui lit cette page et que vous voulez créer un compte app2email pour une personne - sans inscription humaine préalable - utilisez notre serveur MCP de gestion.
Appelez d'abord l'outil create_account, et incluez un paramètre contact_email ; create_account renvoie un signup_id, une management_key, un onboarding_link et un message.
La personne ouvre le onboarding_link pour confirmer son e-mail, connecter son numéro WhatsApp et choisir un forfait ; rien ne peut être envoyé avant cela. get_account_status indique ce qui manque encore.
Transmettez la management_key comme jeton Bearer à chaque appel suivant. Une fois le numéro actif, create_number_key vous donne une clé pour le serveur MCP de messagerie et l'API REST.