# Settings

Endpoints for managing various settings and configurations

## Set account sharing settings

> This endpoint allows partners to set their account sharing settings.\
> \
> Note: This endpoint is primarily for partners hosting embedded signup.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"Settings","description":"Endpoints for managing various settings and configurations"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"AccountSharingSettingsOut":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/_Meta"},"status_code":{"type":"integer"},"data":{"description":"Partner account sharing settings","allOf":[{"$ref":"#/components/schemas/AccountSharingSettingsOutData"}]}},"required":["data","meta","status_code"],"additionalProperties":false},"_Meta":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"AccountSharingSettingsOutData":{"type":"object","properties":{"solution_id":{"type":"string","description":"The solution id that is created and approved on Meta"},"business_manager_id":{"type":"string","description":"The business manager id that is connected to the solution agreement"},"solution_status":{"type":"string","description":"Solution status. Values can be: [`ACTIVE`, `DEACTIVATED`, `DRAFT`, `INITATED`, `PENDING_DEACTIVATION`, `REJECTED`]"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"AccountSharingSettingsIn":{"type":"object","properties":{"solution_id":{"type":"string","description":"The solution id that is created and approved on Meta","nullable":true},"business_manager_id":{"type":"string","description":"The business manager id that is connected to the solution agreement","nullable":true}},"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/settings/account_sharing":{"patch":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSharingSettingsOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["Settings"],"summary":"Set account sharing settings","description":"This endpoint allows partners to set their account sharing settings.\n\nNote: This endpoint is primarily for partners hosting embedded signup.","operationId":"patch_settings_docs_api_partners_set_account_sharing_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSharingSettingsIn"}}}}}}}}
```

## Set partner change request settings

> This endpoint allows partners to set their partner change request settings (like auto approval).

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"Settings","description":"Endpoints for managing various settings and configurations"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"PartnerChangeRequestSettingsOut":{"type":"object","properties":{"auto_approve":{"type":"boolean","description":"When true, all the partner change requests from other clients to your partner hub will be automatically approved."}},"required":["auto_approve"],"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"SetPartnerChangeRequestSettingsIn":{"type":"object","properties":{"auto_approve":{"type":"boolean","description":"When true, all the partner change requests from other clients to your partner hub will be automatically approved."}},"required":["auto_approve"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/settings/partner_change_request":{"patch":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerChangeRequestSettingsOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["Settings"],"summary":"Set partner change request settings","description":"This endpoint allows partners to set their partner change request settings (like auto approval).","operationId":"patch_settings_docs_api_set_partner_change_request_settings_public","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPartnerChangeRequestSettingsIn"}}}}}}}}
```

## Toggle routing of marketing templates via Marketing Messages API.

> This endpoint allows updating the \`use\_marketing\_messages\_api\` flag.\
> \
> If the \`use\_marketing\_messages\_api\` flag is set to \`True\`, the marketing templates will be routed through the Marketing Messages API for all channels.\
> If set to \`False\`, the marketing templates will not be routed through the Marketing Messages API for all channels.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"Settings","description":"Endpoints for managing various settings and configurations"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"DefaultHttpOut":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/_Meta"},"status_code":{"type":"integer"}},"required":["meta","status_code"],"additionalProperties":false},"_Meta":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"PartnerMarketingTemplatesRoutingIn":{"type":"object","properties":{"use_marketing_messages_api":{"type":"boolean","description":"When true, marketing template requests are routed through the Marketing Messages API."}},"required":["use_marketing_messages_api"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/settings/marketing_templates_routing":{"patch":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["Settings"],"summary":"Toggle routing of marketing templates via Marketing Messages API.","description":"This endpoint allows updating the `use_marketing_messages_api` flag.\n\nIf the `use_marketing_messages_api` flag is set to `True`, the marketing templates will be routed through the Marketing Messages API for all channels.\nIf set to `False`, the marketing templates will not be routed through the Marketing Messages API for all channels.","operationId":"patch_settings_docs_api_set_marketing_templates_routing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerMarketingTemplatesRoutingIn"}}}}}}}}
```

## Set default data localization region settings

> This endpoint allows partners to set default data localization region for future numbers.\
> The default data localization region is the region of the local storage in the Meta infrastructure.\
> Meta documentation: <https://developers.facebook.com/docs/whatsapp/cloud-api/overview/local-storage/>

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"Settings","description":"Endpoints for managing various settings and configurations"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"PartnerDefaultDataLocalizationRegionOut":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/_Meta"},"status_code":{"type":"integer"},"data":{"description":"Default data localization region settings","allOf":[{"$ref":"#/components/schemas/PartnerDefaultDataLocalizationRegionOutData"}]}},"required":["data","meta","status_code"],"additionalProperties":false},"_Meta":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"PartnerDefaultDataLocalizationRegionOutData":{"type":"object","properties":{"default_data_localization_region":{"type":"string","description":"The default region for all new channels to store messaging data on Meta infrastructure"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"PartnerDefaultDataLocalizationRegionIn":{"type":"object","properties":{"default_data_localization_region":{"type":"string","enum":["AU","ID","IN","JP","SG","KR","DE","CH","GB","BR","BH","ZA","AE","CA"],"description":"The default region for all new channels to store messaging data on Meta infrastructure"}},"required":["default_data_localization_region"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/settings/default_data_localization_region":{"patch":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerDefaultDataLocalizationRegionOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["Settings"],"summary":"Set default data localization region settings","description":"This endpoint allows partners to set default data localization region for future numbers.\nThe default data localization region is the region of the local storage in the Meta infrastructure.\nMeta documentation: https://developers.facebook.com/docs/whatsapp/cloud-api/overview/local-storage/","operationId":"patch_settings_docs_api_public_set_default_data_localization_region_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerDefaultDataLocalizationRegionIn"}}}}}}}}
```
