Préférences de confidentialité

Fonctions nécessaires

Nécessaires à la sécurité et aux fonctions de base du site.

Toujours activées

Diagnostics Landing et enregistrement avec masquage

Mesure les visites publiques, les abandons et les interactions avec les liens d’inscription à l’aide d’un identifiant anonyme limité à cet onglet, sans lien avec un compte. Tout le texte est masqué et les formulaires sont bloqués.

Statistiques d’utilisation facultatives

Autoriser les statistiques d’utilisation PostHog ? Modifiez votre choix à tout moment dans le pied de page.

Autoriser aussi l’enregistrement des sessions sur ce site public

L’enregistrement en mode intersites facultatif montre les pages publiques et les interactions, en masquant les champs de saisie et les contenus privés. L’enregistrement dans l’application fait l’objet d’un choix distinct.

Nécessite les analyses facultatives ; l’enregistrement dans ce mode intersites est désactivé par défaut. Le mode Landing ci-dessus fonctionne séparément.

Les analyses du navigateur n’activent pas celles du compte.

La recherche se charge uniquement lorsque vous l’utilisez. Parcourez toutes les catégories ci-dessous.

Publicité

Rapprocher une action publicitaire

Relire l’opération publicitaire inconnue exacte sans la renvoyer. L’observation de l’état souhaité reste distincte du résultat initial de la plateforme.

POST /advertising-api/actions/reconcile

Contrat vérifié : · sha256:9aedef8d43dd4514

Présentation

Relire l’opération publicitaire inconnue exacte sans la renvoyer. L’observation de l’état souhaité reste distincte du résultat initial de la plateforme.

Une réponse HTTP réussie peut signifier qu’une requête est acceptée plutôt que terminée. Pour le travail en arrière-plan, conservez l’identifiant renvoyé et suivez la même opération jusqu’à sa fin. Une publication programmée ou acceptée n’est publiée que lorsque la plateforme le confirme ; une expiration côté client ne détermine pas le résultat.

Authentification et autorisations

Types d’identifiants acceptés
user_session, delegated_oauth, personal_access_token
Capacité déléguée
agent:advertising_manage
Rôle minimal dans l’espace de travail
editor
Périmètre d’accès
Ressources auxquelles cet utilisateur est autorisé à accéder
Consentement pour tous les espaces requis
Non
Modifie l’état
Oui
Lorsque l’opération est terminée
synchronous_http_response

Un jeton ne peut utiliser que les droits de son propriétaire. Chaque requête vérifie l’appartenance à l’espace, la propriété des ressources, les espaces sélectionnés et les capacités accordées. Les profils core et full modifient les outils affichés ; ils n’accordent aucun accès.

Champs de requête

Requis signifie requis dans l’objet parent et la branche sélectionnée. Un enfant requis ne rend pas obligatoire un parent facultatif. Les règles et noms de champs ci-dessous proviennent du contrat.

Champs de requête
Champ / brancheType / requisContraintes
$objectRequis dans le parent
  • additionalProperties: false
workspace_idstringRequis dans le parent
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
action_idstringRequis dans le parent
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
candidate_provider_idstringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
JSON Schema complet
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "action_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "candidate_provider_id": {
      "type": "string",
      "pattern": "^[1-9]\\d{1,24}$"
    }
  },
  "required": [
    "workspace_id",
    "action_id"
  ],
  "additionalProperties": false
}

Réponse et achèvement

Statuts HTTP de réussite : 200. Lorsque l’opération est terminée : synchronous_http_response.

Une réponse HTTP réussie peut signifier qu’une requête est acceptée plutôt que terminée. Pour le travail en arrière-plan, conservez l’identifiant renvoyé et suivez la même opération jusqu’à sa fin. Une publication programmée ou acceptée n’est publiée que lorsque la plateforme le confirme ; une expiration côté client ne détermine pas le résultat.

Requis signifie requis dans l’objet parent et la branche sélectionnée. Un enfant requis ne rend pas obligatoire un parent facultatif. Les règles et noms de champs ci-dessous proviennent du contrat.

Réponse et achèvement
Champ / brancheType / requisContraintes
$objectRequis dans le parent—
contract_versionstringRequis dans le parent
  • const: "advertising/v1"
actionobjectRequis dans le parent—
action.idstringRequis dans le parent
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
action.workspace_idstringRequis dans le parent
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
action.advertising_account_idstringRequis dans le parent
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
action.mutation_idstringRequis dans le parent
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
action.statusstringRequis dans le parent
  • enum: ["prepared","queued","processing","succeeded","failed","unknown","cancelled"]
action.commandobjectRequis dans le parent—
action.commandoneOf 1objectRequis dans le parent—
action.command.operationoneOf 1stringRequis dans le parent
  • const: "create_campaign"
action.command.nameoneOf 1stringRequis dans le parent
  • minLength: 1
  • maxLength: 200
action.command.budgetoneOf 1objectFacultatif / élément—
action.command.budget.kindoneOf 1stringRequis dans le parent
  • enum: ["daily","lifetime"]
action.command.budget.amount_minoroneOf 1stringRequis dans le parent
  • pattern: "^[1-9]\\d{0,11}$"
action.command.objectiveoneOf 1stringRequis dans le parent
  • enum: ["OUTCOME_AWARENESS","OUTCOME_ENGAGEMENT","OUTCOME_LEADS","OUTCOME_SALES","OUTCOME_TRAFFIC","OUTCOME_APP_PROMOTION"]
action.command.special_ad_categoriesoneOf 1arrayRequis dans le parent
  • maxItems: 4
  • default: []
action.command.special_ad_categories[]oneOf 1stringFacultatif / élément
  • enum: ["CREDIT","EMPLOYMENT","HOUSING","ISSUES_ELECTIONS_POLITICS"]
action.command.statusoneOf 1stringRequis dans le parent
  • const: "PAUSED"
  • default: "PAUSED"
action.commandoneOf 2objectRequis dans le parent—
action.command.operationoneOf 2stringRequis dans le parent
  • const: "update_campaign"
action.command.object_idoneOf 2stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
action.command.nameoneOf 2stringFacultatif / élément
  • minLength: 1
  • maxLength: 200
action.command.budgetoneOf 2objectFacultatif / élément—
action.command.budget.kindoneOf 2stringRequis dans le parent
  • enum: ["daily","lifetime"]
action.command.budget.amount_minoroneOf 2stringRequis dans le parent
  • pattern: "^[1-9]\\d{0,11}$"
action.command.statusoneOf 2stringFacultatif / élément
  • enum: ["ACTIVE","PAUSED","ARCHIVED"]
action.commandoneOf 3objectRequis dans le parent—
action.command.operationoneOf 3stringRequis dans le parent
  • const: "create_adset"
action.command.campaign_idoneOf 3stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
action.command.nameoneOf 3stringRequis dans le parent
  • minLength: 1
  • maxLength: 200
action.command.budgetoneOf 3objectFacultatif / élément—
action.command.budget.kindoneOf 3stringRequis dans le parent
  • enum: ["daily","lifetime"]
action.command.budget.amount_minoroneOf 3stringRequis dans le parent
  • pattern: "^[1-9]\\d{0,11}$"
action.command.targetingoneOf 3objectRequis dans le parent—
action.command.targeting.geo_locationsoneOf 3objectRequis dans le parent—
action.command.targeting.geo_locations.countriesoneOf 3arrayRequis dans le parent
  • minItems: 1
  • maxItems: 25
action.command.targeting.geo_locations.countries[]oneOf 3stringFacultatif / élément
  • pattern: "^[A-Z]{2}$"
action.command.targeting.age_minoneOf 3integerRequis dans le parent
  • minimum: 18
  • maximum: 65
  • default: 18
action.command.targeting.age_maxoneOf 3integerRequis dans le parent
  • minimum: 18
  • maximum: 65
  • default: 65
action.command.targeting.gendersoneOf 3arrayFacultatif / élément
  • minItems: 1
  • maxItems: 2
action.command.targeting.genders[]oneOf 3numberFacultatif / élément—
action.command.targeting.genders[]oneOf 3 / anyOf 1numberFacultatif / élément
  • const: 1
action.command.targeting.genders[]oneOf 3 / anyOf 2numberFacultatif / élément
  • const: 2
action.command.targeting.localesoneOf 3arrayFacultatif / élément
  • maxItems: 25
action.command.targeting.locales[]oneOf 3integerFacultatif / élément
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
action.command.targeting.publisher_platformsoneOf 3arrayRequis dans le parent
  • minItems: 1
  • maxItems: 3
action.command.targeting.publisher_platforms[]oneOf 3stringFacultatif / élément
  • enum: ["facebook","instagram","threads"]
action.command.targeting.facebook_positionsoneOf 3arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.facebook_positions[]oneOf 3stringFacultatif / élément
  • enum: ["feed","story","facebook_reels","video_feeds"]
action.command.targeting.instagram_positionsoneOf 3arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.instagram_positions[]oneOf 3stringFacultatif / élément
  • enum: ["stream","story","reels","explore"]
action.command.targeting.threads_positionsoneOf 3arrayFacultatif / élément
  • maxItems: 1
action.command.targeting.threads_positions[]oneOf 3stringFacultatif / élément
  • const: "threads_stream"
action.command.targeting.custom_audience_idsoneOf 3arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.custom_audience_ids[]oneOf 3stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.targeting.excluded_custom_audience_idsoneOf 3arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.excluded_custom_audience_ids[]oneOf 3stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.billing_eventoneOf 3stringRequis dans le parent
  • enum: ["IMPRESSIONS","LINK_CLICKS"]
action.command.optimization_goaloneOf 3stringRequis dans le parent
  • enum: ["REACH","IMPRESSIONS","LINK_CLICKS","LANDING_PAGE_VIEWS","OFFSITE_CONVERSIONS","LEAD_GENERATION"]
action.command.bid_strategyoneOf 3stringRequis dans le parent
  • const: "LOWEST_COST_WITHOUT_CAP"
  • default: "LOWEST_COST_WITHOUT_CAP"
action.command.start_timeoneOf 3stringFacultatif / élément
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
action.command.end_timeoneOf 3stringFacultatif / élément
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
action.command.promoted_objectoneOf 3objectFacultatif / élément—
action.command.promoted_object.page_idoneOf 3stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.promoted_object.pixel_idoneOf 3stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.promoted_object.custom_event_typeoneOf 3stringFacultatif / élément
  • enum: ["PURCHASE","LEAD","COMPLETE_REGISTRATION","ADD_TO_CART"]
action.command.statusoneOf 3stringRequis dans le parent
  • const: "PAUSED"
  • default: "PAUSED"
action.commandoneOf 4objectRequis dans le parent—
action.command.operationoneOf 4stringRequis dans le parent
  • const: "update_adset"
action.command.object_idoneOf 4stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
action.command.nameoneOf 4stringFacultatif / élément
  • minLength: 1
  • maxLength: 200
action.command.budgetoneOf 4objectFacultatif / élément—
action.command.budget.kindoneOf 4stringRequis dans le parent
  • enum: ["daily","lifetime"]
action.command.budget.amount_minoroneOf 4stringRequis dans le parent
  • pattern: "^[1-9]\\d{0,11}$"
action.command.statusoneOf 4stringFacultatif / élément
  • enum: ["ACTIVE","PAUSED","ARCHIVED"]
action.command.targetingoneOf 4objectFacultatif / élément—
action.command.targeting.geo_locationsoneOf 4objectRequis dans le parent—
action.command.targeting.geo_locations.countriesoneOf 4arrayRequis dans le parent
  • minItems: 1
  • maxItems: 25
action.command.targeting.geo_locations.countries[]oneOf 4stringFacultatif / élément
  • pattern: "^[A-Z]{2}$"
action.command.targeting.age_minoneOf 4integerRequis dans le parent
  • minimum: 18
  • maximum: 65
  • default: 18
action.command.targeting.age_maxoneOf 4integerRequis dans le parent
  • minimum: 18
  • maximum: 65
  • default: 65
action.command.targeting.gendersoneOf 4arrayFacultatif / élément
  • minItems: 1
  • maxItems: 2
action.command.targeting.genders[]oneOf 4numberFacultatif / élément—
action.command.targeting.genders[]oneOf 4 / anyOf 1numberFacultatif / élément
  • const: 1
action.command.targeting.genders[]oneOf 4 / anyOf 2numberFacultatif / élément
  • const: 2
action.command.targeting.localesoneOf 4arrayFacultatif / élément
  • maxItems: 25
action.command.targeting.locales[]oneOf 4integerFacultatif / élément
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
action.command.targeting.publisher_platformsoneOf 4arrayRequis dans le parent
  • minItems: 1
  • maxItems: 3
action.command.targeting.publisher_platforms[]oneOf 4stringFacultatif / élément
  • enum: ["facebook","instagram","threads"]
action.command.targeting.facebook_positionsoneOf 4arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.facebook_positions[]oneOf 4stringFacultatif / élément
  • enum: ["feed","story","facebook_reels","video_feeds"]
action.command.targeting.instagram_positionsoneOf 4arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.instagram_positions[]oneOf 4stringFacultatif / élément
  • enum: ["stream","story","reels","explore"]
action.command.targeting.threads_positionsoneOf 4arrayFacultatif / élément
  • maxItems: 1
action.command.targeting.threads_positions[]oneOf 4stringFacultatif / élément
  • const: "threads_stream"
action.command.targeting.custom_audience_idsoneOf 4arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.custom_audience_ids[]oneOf 4stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.targeting.excluded_custom_audience_idsoneOf 4arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.excluded_custom_audience_ids[]oneOf 4stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.start_timeoneOf 4stringFacultatif / élément
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
action.command.end_timeoneOf 4stringFacultatif / élément
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
action.commandoneOf 5objectRequis dans le parent—
action.command.operationoneOf 5stringRequis dans le parent
  • const: "create_ad"
action.command.nameoneOf 5stringRequis dans le parent
  • minLength: 1
  • maxLength: 200
action.command.adset_idoneOf 5stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
action.command.creative_idoneOf 5stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
action.command.statusoneOf 5stringRequis dans le parent
  • const: "PAUSED"
  • default: "PAUSED"
action.commandoneOf 6objectRequis dans le parent—
action.command.operationoneOf 6stringRequis dans le parent
  • const: "update_ad"
action.command.object_idoneOf 6stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
action.command.nameoneOf 6stringFacultatif / élément
  • minLength: 1
  • maxLength: 200
action.command.creative_idoneOf 6stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.statusoneOf 6stringFacultatif / élément
  • enum: ["ACTIVE","PAUSED","ARCHIVED"]
action.commandoneOf 7objectRequis dans le parent—
action.command.operationoneOf 7stringRequis dans le parent
  • const: "create_creative"
action.command.nameoneOf 7stringRequis dans le parent
  • minLength: 1
  • maxLength: 200
action.command.object_story_speconeOf 7objectFacultatif / élément—
action.command.object_story_spec.page_idoneOf 7stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
action.command.object_story_spec.instagram_user_idoneOf 7stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.object_story_spec.link_dataoneOf 7objectRequis dans le parent—
action.command.object_story_spec.link_data.linkoneOf 7stringRequis dans le parent
  • format: "uri"
  • maxLength: 2048
action.command.object_story_spec.link_data.messageoneOf 7stringRequis dans le parent
  • maxLength: 5000
action.command.object_story_spec.link_data.nameoneOf 7stringFacultatif / élément
  • minLength: 1
  • maxLength: 200
action.command.object_story_spec.link_data.image_hashoneOf 7stringRequis dans le parent
  • pattern: "^[a-fA-F0-9]{16,128}$"
action.command.object_story_spec.link_data.call_to_actiononeOf 7stringFacultatif / élément
  • enum: ["LEARN_MORE","SHOP_NOW","SIGN_UP","CONTACT_US"]
action.command.object_story_idoneOf 7stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}_[1-9]\\d{1,24}$"
action.commandoneOf 8objectRequis dans le parent—
action.command.operationoneOf 8stringRequis dans le parent
  • const: "create_saved_audience"
action.command.nameoneOf 8stringRequis dans le parent
  • minLength: 1
  • maxLength: 200
action.command.targetingoneOf 8objectRequis dans le parent—
action.command.targeting.geo_locationsoneOf 8objectRequis dans le parent—
action.command.targeting.geo_locations.countriesoneOf 8arrayRequis dans le parent
  • minItems: 1
  • maxItems: 25
action.command.targeting.geo_locations.countries[]oneOf 8stringFacultatif / élément
  • pattern: "^[A-Z]{2}$"
action.command.targeting.age_minoneOf 8integerRequis dans le parent
  • minimum: 18
  • maximum: 65
  • default: 18
action.command.targeting.age_maxoneOf 8integerRequis dans le parent
  • minimum: 18
  • maximum: 65
  • default: 65
action.command.targeting.gendersoneOf 8arrayFacultatif / élément
  • minItems: 1
  • maxItems: 2
action.command.targeting.genders[]oneOf 8numberFacultatif / élément—
action.command.targeting.genders[]oneOf 8 / anyOf 1numberFacultatif / élément
  • const: 1
action.command.targeting.genders[]oneOf 8 / anyOf 2numberFacultatif / élément
  • const: 2
action.command.targeting.localesoneOf 8arrayFacultatif / élément
  • maxItems: 25
action.command.targeting.locales[]oneOf 8integerFacultatif / élément
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
action.command.targeting.publisher_platformsoneOf 8arrayRequis dans le parent
  • minItems: 1
  • maxItems: 3
action.command.targeting.publisher_platforms[]oneOf 8stringFacultatif / élément
  • enum: ["facebook","instagram","threads"]
action.command.targeting.facebook_positionsoneOf 8arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.facebook_positions[]oneOf 8stringFacultatif / élément
  • enum: ["feed","story","facebook_reels","video_feeds"]
action.command.targeting.instagram_positionsoneOf 8arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.instagram_positions[]oneOf 8stringFacultatif / élément
  • enum: ["stream","story","reels","explore"]
action.command.targeting.threads_positionsoneOf 8arrayFacultatif / élément
  • maxItems: 1
action.command.targeting.threads_positions[]oneOf 8stringFacultatif / élément
  • const: "threads_stream"
action.command.targeting.custom_audience_idsoneOf 8arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.custom_audience_ids[]oneOf 8stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.targeting.excluded_custom_audience_idsoneOf 8arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.excluded_custom_audience_ids[]oneOf 8stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.commandoneOf 9objectRequis dans le parent—
action.command.operationoneOf 9stringRequis dans le parent
  • const: "update_saved_audience"
action.command.object_idoneOf 9stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
action.command.nameoneOf 9stringFacultatif / élément
  • minLength: 1
  • maxLength: 200
action.command.targetingoneOf 9objectFacultatif / élément—
action.command.targeting.geo_locationsoneOf 9objectRequis dans le parent—
action.command.targeting.geo_locations.countriesoneOf 9arrayRequis dans le parent
  • minItems: 1
  • maxItems: 25
action.command.targeting.geo_locations.countries[]oneOf 9stringFacultatif / élément
  • pattern: "^[A-Z]{2}$"
action.command.targeting.age_minoneOf 9integerRequis dans le parent
  • minimum: 18
  • maximum: 65
  • default: 18
action.command.targeting.age_maxoneOf 9integerRequis dans le parent
  • minimum: 18
  • maximum: 65
  • default: 65
action.command.targeting.gendersoneOf 9arrayFacultatif / élément
  • minItems: 1
  • maxItems: 2
action.command.targeting.genders[]oneOf 9numberFacultatif / élément—
action.command.targeting.genders[]oneOf 9 / anyOf 1numberFacultatif / élément
  • const: 1
action.command.targeting.genders[]oneOf 9 / anyOf 2numberFacultatif / élément
  • const: 2
action.command.targeting.localesoneOf 9arrayFacultatif / élément
  • maxItems: 25
action.command.targeting.locales[]oneOf 9integerFacultatif / élément
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
action.command.targeting.publisher_platformsoneOf 9arrayRequis dans le parent
  • minItems: 1
  • maxItems: 3
action.command.targeting.publisher_platforms[]oneOf 9stringFacultatif / élément
  • enum: ["facebook","instagram","threads"]
action.command.targeting.facebook_positionsoneOf 9arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.facebook_positions[]oneOf 9stringFacultatif / élément
  • enum: ["feed","story","facebook_reels","video_feeds"]
action.command.targeting.instagram_positionsoneOf 9arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.instagram_positions[]oneOf 9stringFacultatif / élément
  • enum: ["stream","story","reels","explore"]
action.command.targeting.threads_positionsoneOf 9arrayFacultatif / élément
  • maxItems: 1
action.command.targeting.threads_positions[]oneOf 9stringFacultatif / élément
  • const: "threads_stream"
action.command.targeting.custom_audience_idsoneOf 9arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.custom_audience_ids[]oneOf 9stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.command.targeting.excluded_custom_audience_idsoneOf 9arrayFacultatif / élément
  • maxItems: 4
action.command.targeting.excluded_custom_audience_ids[]oneOf 9stringFacultatif / élément
  • pattern: "^[1-9]\\d{1,24}$"
action.reviewed_digeststringRequis dans le parent
  • pattern: "^[a-f0-9]{64}$"
action.effectsobjectRequis dans le parent—
action.effects.creates_objectbooleanRequis dans le parent—
action.effects.initial_statusstring | nullRequis dans le parent—
action.effects.initial_statusanyOf 1stringRequis dans le parent
  • const: "PAUSED"
action.effects.initial_statusanyOf 2nullRequis dans le parent—
action.effects.activates_deliverybooleanRequis dans le parent—
action.effects.changes_budgetbooleanRequis dans le parent—
action.effects.changes_audiencebooleanRequis dans le parent—
action.effects.changes_creativebooleanRequis dans le parent—
action.effects.currencystringRequis dans le parent
  • pattern: "^[A-Z]{3}$"
action.effects.timezonestringRequis dans le parent
  • minLength: 1
  • maxLength: 100
action.effects.budgetobject | nullRequis dans le parent—
action.effects.budgetanyOf 1objectRequis dans le parent—
action.effects.budget.kindanyOf 1stringRequis dans le parent
  • enum: ["daily","lifetime"]
action.effects.budget.amount_minoranyOf 1stringRequis dans le parent
  • pattern: "^[1-9]\\d{0,11}$"
action.effects.budgetanyOf 2nullRequis dans le parent—
action.live_approvalobjectRequis dans le parent—
action.live_approval.requiredbooleanRequis dans le parent—
action.live_approval.statestringRequis dans le parent
  • enum: ["not_required","missing","approved","expired","revoked","invalid"]
action.live_approval.reasonstring | nullRequis dans le parent—
action.live_approval.reasonanyOf 1stringRequis dans le parent
  • maxLength: 100
action.live_approval.reasonanyOf 2nullRequis dans le parent—
action.live_approval.expires_atstring | nullRequis dans le parent—
action.live_approval.expires_atanyOf 1stringRequis dans le parent
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
action.live_approval.expires_atanyOf 2nullRequis dans le parent—
action.live_approval.approved_bystring | nullRequis dans le parent—
action.live_approval.approved_byanyOf 1stringRequis dans le parent
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
action.live_approval.approved_byanyOf 2nullRequis dans le parent—
action.provider_object_idstring | nullRequis dans le parent—
action.provider_object_idanyOf 1stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
action.provider_object_idanyOf 2nullRequis dans le parent—
action.failure_codestring | nullRequis dans le parent—
action.failure_codeanyOf 1stringRequis dans le parent
  • maxLength: 100
action.failure_codeanyOf 2nullRequis dans le parent—
action.created_atstringRequis dans le parent
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
action.completed_atstring | nullRequis dans le parent—
action.completed_atanyOf 1stringRequis dans le parent
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
action.completed_atanyOf 2nullRequis dans le parent—
resultstringRequis dans le parent
  • enum: ["desired_state_observed","unresolved"]
provider_object_idstring | nullRequis dans le parent—
provider_object_idanyOf 1stringRequis dans le parent
  • pattern: "^[1-9]\\d{1,24}$"
provider_object_idanyOf 2nullRequis dans le parent—
observed_atstringRequis dans le parent
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
JSON Schema complet
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract_version": {
      "type": "string",
      "const": "advertising/v1"
    },
    "action": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "workspace_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "advertising_account_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "mutation_id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "status": {
          "type": "string",
          "enum": [
            "prepared",
            "queued",
            "processing",
            "succeeded",
            "failed",
            "unknown",
            "cancelled"
          ]
        },
        "command": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "const": "create_campaign"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "budget": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "daily",
                        "lifetime"
                      ]
                    },
                    "amount_minor": {
                      "type": "string",
                      "pattern": "^[1-9]\\d{0,11}$"
                    }
                  },
                  "required": [
                    "kind",
                    "amount_minor"
                  ]
                },
                "objective": {
                  "type": "string",
                  "enum": [
                    "OUTCOME_AWARENESS",
                    "OUTCOME_ENGAGEMENT",
                    "OUTCOME_LEADS",
                    "OUTCOME_SALES",
                    "OUTCOME_TRAFFIC",
                    "OUTCOME_APP_PROMOTION"
                  ]
                },
                "special_ad_categories": {
                  "default": [],
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "CREDIT",
                      "EMPLOYMENT",
                      "HOUSING",
                      "ISSUES_ELECTIONS_POLITICS"
                    ]
                  }
                },
                "status": {
                  "default": "PAUSED",
                  "type": "string",
                  "const": "PAUSED"
                }
              },
              "required": [
                "operation",
                "name",
                "objective",
                "special_ad_categories",
                "status"
              ]
            },
            {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "const": "update_campaign"
                },
                "object_id": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{1,24}$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "budget": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "daily",
                        "lifetime"
                      ]
                    },
                    "amount_minor": {
                      "type": "string",
                      "pattern": "^[1-9]\\d{0,11}$"
                    }
                  },
                  "required": [
                    "kind",
                    "amount_minor"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "PAUSED",
                    "ARCHIVED"
                  ]
                }
              },
              "required": [
                "operation",
                "object_id"
              ]
            },
            {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "const": "create_adset"
                },
                "campaign_id": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{1,24}$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "budget": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "daily",
                        "lifetime"
                      ]
                    },
                    "amount_minor": {
                      "type": "string",
                      "pattern": "^[1-9]\\d{0,11}$"
                    }
                  },
                  "required": [
                    "kind",
                    "amount_minor"
                  ]
                },
                "targeting": {
                  "type": "object",
                  "properties": {
                    "geo_locations": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "minItems": 1,
                          "maxItems": 25,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          }
                        }
                      },
                      "required": [
                        "countries"
                      ]
                    },
                    "age_min": {
                      "default": 18,
                      "type": "integer",
                      "minimum": 18,
                      "maximum": 65
                    },
                    "age_max": {
                      "default": 65,
                      "type": "integer",
                      "minimum": 18,
                      "maximum": 65
                    },
                    "genders": {
                      "minItems": 1,
                      "maxItems": 2,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ]
                      }
                    },
                    "locales": {
                      "maxItems": 25,
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "publisher_platforms": {
                      "minItems": 1,
                      "maxItems": 3,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "facebook",
                          "instagram",
                          "threads"
                        ]
                      }
                    },
                    "facebook_positions": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "feed",
                          "story",
                          "facebook_reels",
                          "video_feeds"
                        ]
                      }
                    },
                    "instagram_positions": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "stream",
                          "story",
                          "reels",
                          "explore"
                        ]
                      }
                    },
                    "threads_positions": {
                      "maxItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "const": "threads_stream"
                      }
                    },
                    "custom_audience_ids": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[1-9]\\d{1,24}$"
                      }
                    },
                    "excluded_custom_audience_ids": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[1-9]\\d{1,24}$"
                      }
                    }
                  },
                  "required": [
                    "geo_locations",
                    "age_min",
                    "age_max",
                    "publisher_platforms"
                  ]
                },
                "billing_event": {
                  "type": "string",
                  "enum": [
                    "IMPRESSIONS",
                    "LINK_CLICKS"
                  ]
                },
                "optimization_goal": {
                  "type": "string",
                  "enum": [
                    "REACH",
                    "IMPRESSIONS",
                    "LINK_CLICKS",
                    "LANDING_PAGE_VIEWS",
                    "OFFSITE_CONVERSIONS",
                    "LEAD_GENERATION"
                  ]
                },
                "bid_strategy": {
                  "default": "LOWEST_COST_WITHOUT_CAP",
                  "type": "string",
                  "const": "LOWEST_COST_WITHOUT_CAP"
                },
                "start_time": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "end_time": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "promoted_object": {
                  "type": "object",
                  "properties": {
                    "page_id": {
                      "type": "string",
                      "pattern": "^[1-9]\\d{1,24}$"
                    },
                    "pixel_id": {
                      "type": "string",
                      "pattern": "^[1-9]\\d{1,24}$"
                    },
                    "custom_event_type": {
                      "type": "string",
                      "enum": [
                        "PURCHASE",
                        "LEAD",
                        "COMPLETE_REGISTRATION",
                        "ADD_TO_CART"
                      ]
                    }
                  }
                },
                "status": {
                  "default": "PAUSED",
                  "type": "string",
                  "const": "PAUSED"
                }
              },
              "required": [
                "operation",
                "campaign_id",
                "name",
                "targeting",
                "billing_event",
                "optimization_goal",
                "bid_strategy",
                "status"
              ]
            },
            {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "const": "update_adset"
                },
                "object_id": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{1,24}$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "budget": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "daily",
                        "lifetime"
                      ]
                    },
                    "amount_minor": {
                      "type": "string",
                      "pattern": "^[1-9]\\d{0,11}$"
                    }
                  },
                  "required": [
                    "kind",
                    "amount_minor"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "PAUSED",
                    "ARCHIVED"
                  ]
                },
                "targeting": {
                  "type": "object",
                  "properties": {
                    "geo_locations": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "minItems": 1,
                          "maxItems": 25,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          }
                        }
                      },
                      "required": [
                        "countries"
                      ]
                    },
                    "age_min": {
                      "default": 18,
                      "type": "integer",
                      "minimum": 18,
                      "maximum": 65
                    },
                    "age_max": {
                      "default": 65,
                      "type": "integer",
                      "minimum": 18,
                      "maximum": 65
                    },
                    "genders": {
                      "minItems": 1,
                      "maxItems": 2,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ]
                      }
                    },
                    "locales": {
                      "maxItems": 25,
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "publisher_platforms": {
                      "minItems": 1,
                      "maxItems": 3,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "facebook",
                          "instagram",
                          "threads"
                        ]
                      }
                    },
                    "facebook_positions": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "feed",
                          "story",
                          "facebook_reels",
                          "video_feeds"
                        ]
                      }
                    },
                    "instagram_positions": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "stream",
                          "story",
                          "reels",
                          "explore"
                        ]
                      }
                    },
                    "threads_positions": {
                      "maxItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "const": "threads_stream"
                      }
                    },
                    "custom_audience_ids": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[1-9]\\d{1,24}$"
                      }
                    },
                    "excluded_custom_audience_ids": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[1-9]\\d{1,24}$"
                      }
                    }
                  },
                  "required": [
                    "geo_locations",
                    "age_min",
                    "age_max",
                    "publisher_platforms"
                  ]
                },
                "start_time": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "end_time": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "operation",
                "object_id"
              ]
            },
            {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "const": "create_ad"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "adset_id": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{1,24}$"
                },
                "creative_id": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{1,24}$"
                },
                "status": {
                  "default": "PAUSED",
                  "type": "string",
                  "const": "PAUSED"
                }
              },
              "required": [
                "operation",
                "name",
                "adset_id",
                "creative_id",
                "status"
              ]
            },
            {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "const": "update_ad"
                },
                "object_id": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{1,24}$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "creative_id": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{1,24}$"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "PAUSED",
                    "ARCHIVED"
                  ]
                }
              },
              "required": [
                "operation",
                "object_id"
              ]
            },
            {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "const": "create_creative"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "object_story_spec": {
                  "type": "object",
                  "properties": {
                    "page_id": {
                      "type": "string",
                      "pattern": "^[1-9]\\d{1,24}$"
                    },
                    "instagram_user_id": {
                      "type": "string",
                      "pattern": "^[1-9]\\d{1,24}$"
                    },
                    "link_data": {
                      "type": "object",
                      "properties": {
                        "link": {
                          "type": "string",
                          "maxLength": 2048,
                          "format": "uri"
                        },
                        "message": {
                          "type": "string",
                          "maxLength": 5000
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "image_hash": {
                          "type": "string",
                          "pattern": "^[a-fA-F0-9]{16,128}$"
                        },
                        "call_to_action": {
                          "type": "string",
                          "enum": [
                            "LEARN_MORE",
                            "SHOP_NOW",
                            "SIGN_UP",
                            "CONTACT_US"
                          ]
                        }
                      },
                      "required": [
                        "link",
                        "message",
                        "image_hash"
                      ]
                    }
                  },
                  "required": [
                    "page_id",
                    "link_data"
                  ]
                },
                "object_story_id": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{1,24}_[1-9]\\d{1,24}$"
                }
              },
              "required": [
                "operation",
                "name"
              ]
            },
            {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "const": "create_saved_audience"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "targeting": {
                  "type": "object",
                  "properties": {
                    "geo_locations": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "minItems": 1,
                          "maxItems": 25,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          }
                        }
                      },
                      "required": [
                        "countries"
                      ]
                    },
                    "age_min": {
                      "default": 18,
                      "type": "integer",
                      "minimum": 18,
                      "maximum": 65
                    },
                    "age_max": {
                      "default": 65,
                      "type": "integer",
                      "minimum": 18,
                      "maximum": 65
                    },
                    "genders": {
                      "minItems": 1,
                      "maxItems": 2,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ]
                      }
                    },
                    "locales": {
                      "maxItems": 25,
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "publisher_platforms": {
                      "minItems": 1,
                      "maxItems": 3,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "facebook",
                          "instagram",
                          "threads"
                        ]
                      }
                    },
                    "facebook_positions": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "feed",
                          "story",
                          "facebook_reels",
                          "video_feeds"
                        ]
                      }
                    },
                    "instagram_positions": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "stream",
                          "story",
                          "reels",
                          "explore"
                        ]
                      }
                    },
                    "threads_positions": {
                      "maxItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "const": "threads_stream"
                      }
                    },
                    "custom_audience_ids": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[1-9]\\d{1,24}$"
                      }
                    },
                    "excluded_custom_audience_ids": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[1-9]\\d{1,24}$"
                      }
                    }
                  },
                  "required": [
                    "geo_locations",
                    "age_min",
                    "age_max",
                    "publisher_platforms"
                  ]
                }
              },
              "required": [
                "operation",
                "name",
                "targeting"
              ]
            },
            {
              "type": "object",
              "properties": {
                "operation": {
                  "type": "string",
                  "const": "update_saved_audience"
                },
                "object_id": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{1,24}$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "targeting": {
                  "type": "object",
                  "properties": {
                    "geo_locations": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "minItems": 1,
                          "maxItems": 25,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          }
                        }
                      },
                      "required": [
                        "countries"
                      ]
                    },
                    "age_min": {
                      "default": 18,
                      "type": "integer",
                      "minimum": 18,
                      "maximum": 65
                    },
                    "age_max": {
                      "default": 65,
                      "type": "integer",
                      "minimum": 18,
                      "maximum": 65
                    },
                    "genders": {
                      "minItems": 1,
                      "maxItems": 2,
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ]
                      }
                    },
                    "locales": {
                      "maxItems": 25,
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "publisher_platforms": {
                      "minItems": 1,
                      "maxItems": 3,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "facebook",
                          "instagram",
                          "threads"
                        ]
                      }
                    },
                    "facebook_positions": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "feed",
                          "story",
                          "facebook_reels",
                          "video_feeds"
                        ]
                      }
                    },
                    "instagram_positions": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "stream",
                          "story",
                          "reels",
                          "explore"
                        ]
                      }
                    },
                    "threads_positions": {
                      "maxItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "const": "threads_stream"
                      }
                    },
                    "custom_audience_ids": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[1-9]\\d{1,24}$"
                      }
                    },
                    "excluded_custom_audience_ids": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[1-9]\\d{1,24}$"
                      }
                    }
                  },
                  "required": [
                    "geo_locations",
                    "age_min",
                    "age_max",
                    "publisher_platforms"
                  ]
                }
              },
              "required": [
                "operation",
                "object_id"
              ]
            }
          ]
        },
        "reviewed_digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "effects": {
          "type": "object",
          "properties": {
            "creates_object": {
              "type": "boolean"
            },
            "initial_status": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "PAUSED"
                },
                {
                  "type": "null"
                }
              ]
            },
            "activates_delivery": {
              "type": "boolean"
            },
            "changes_budget": {
              "type": "boolean"
            },
            "changes_audience": {
              "type": "boolean"
            },
            "changes_creative": {
              "type": "boolean"
            },
            "currency": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            "timezone": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "budget": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "daily",
                        "lifetime"
                      ]
                    },
                    "amount_minor": {
                      "type": "string",
                      "pattern": "^[1-9]\\d{0,11}$"
                    }
                  },
                  "required": [
                    "kind",
                    "amount_minor"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "creates_object",
            "initial_status",
            "activates_delivery",
            "changes_budget",
            "changes_audience",
            "changes_creative",
            "currency",
            "timezone",
            "budget"
          ]
        },
        "live_approval": {
          "type": "object",
          "properties": {
            "required": {
              "type": "boolean"
            },
            "state": {
              "type": "string",
              "enum": [
                "not_required",
                "missing",
                "approved",
                "expired",
                "revoked",
                "invalid"
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 100
                },
                {
                  "type": "null"
                }
              ]
            },
            "expires_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "approved_by": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "required",
            "state",
            "reason",
            "expires_at",
            "approved_by"
          ]
        },
        "provider_object_id": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[1-9]\\d{1,24}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "failure_code": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 100
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "completed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "workspace_id",
        "advertising_account_id",
        "mutation_id",
        "status",
        "command",
        "reviewed_digest",
        "effects",
        "live_approval",
        "provider_object_id",
        "failure_code",
        "created_at",
        "completed_at"
      ]
    },
    "result": {
      "type": "string",
      "enum": [
        "desired_state_observed",
        "unresolved"
      ]
    },
    "provider_object_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[1-9]\\d{1,24}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "observed_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    }
  },
  "required": [
    "contract_version",
    "action",
    "result",
    "provider_object_id",
    "observed_at"
  ]
}

Erreurs et nouvelles tentatives sûres

Vérifiez le statut HTTP et le corps de réponse. Une erreur de validation 400 peut contenir un ZodError ; les erreurs des gestionnaires utilisent les champs error, message et code. Conservez request_id ou x-request-id pour le diagnostic, sans identifiants secrets. Corrigez les erreurs d’accès 401/403 avant de réessayer et respectez Retry-After pour 429. Si une écriture est incertaine ou renvoie 5xx, lisez d’abord le résultat existant. Réutilisez une clé d’idempotence uniquement lorsque c’est pris en charge ; le comportement des nouvelles tentatives varie selon l’opération et ne garantit pas une diffusion exactement une fois.

Guide de dépannage

Exemples

Ces exemples utilisent des valeurs fictives vérifiées contre les schémas. Remplacez les identifiants par ceux que vous êtes autorisé à utiliser, les médias par des ressources prêtes et les dates par l’heure confirmée. Vérifiez l’éligibilité du compte avant toute écriture. Cette page n’envoie aucune requête API.

Définissez SOSOAPI_ACCESS_TOKEN sur votre serveur avec un identifiant accepté par cette opération et gardez-le hors du code navigateur. Pour un agent IA, utilisez sosoapi auth login pour vous connecter dans le navigateur et laissez la CLI actualiser ses identifiants.

request.json

{
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "action_id": "11111111-1111-4111-8111-111111111111"
}

cURL

curl --request POST \
  "https://gqeshlawtcexsapabaui.supabase.co/functions/v1/advertising-api/actions/reconcile" \
  -H "Authorization: Bearer $SOSOAPI_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @request.json

JavaScript

// Server-side JavaScript. Do not print tokens or credential-bearing responses.
const token = process.env.SOSOAPI_ACCESS_TOKEN;
if (!token) throw new Error("Set an accepted credential for this operation");
const response = await fetch("https://gqeshlawtcexsapabaui.supabase.co/functions/v1/advertising-api/actions/reconcile", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer " + token },
  body: JSON.stringify({
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "action_id": "11111111-1111-4111-8111-111111111111"
})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.

CLI

npx sosoapi api post /advertising-api/actions/reconcile < request.json

Exemple de réponse fictive

{
  "contract_version": "advertising/v1",
  "action": {
    "id": "11111111-1111-4111-8111-111111111111",
    "workspace_id": "11111111-1111-4111-8111-111111111111",
    "advertising_account_id": "11111111-1111-4111-8111-111111111111",
    "mutation_id": "11111111-1111-4111-8111-111111111111",
    "status": "prepared",
    "command": {
      "operation": "create_campaign",
      "name": "example",
      "objective": "OUTCOME_AWARENESS",
      "special_ad_categories": [],
      "status": "PAUSED"
    },
    "reviewed_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "effects": {
      "creates_object": false,
      "initial_status": null,
      "activates_delivery": false,
      "changes_budget": false,
      "changes_audience": false,
      "changes_creative": false,
      "currency": "USD",
      "timezone": "UTC",
      "budget": null
    },
    "live_approval": {
      "required": false,
      "state": "not_required",
      "reason": null,
      "expires_at": null,
      "approved_by": null
    },
    "provider_object_id": null,
    "failure_code": null,
    "created_at": "2099-01-15T09:00:00Z",
    "completed_at": null
  },
  "result": "desired_state_observed",
  "provider_object_id": null,
  "observed_at": "2099-01-15T09:00:00Z"
}

MCP : sosoapi_ads_actions_reconcile