{"openapi":"3.1.0","info":{"title":"Apizie","version":"2.0.0","description":"One API key, one envelope, many public data sources."},"servers":[{"url":"https://zieapi.vercel.app"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/v1/communication:sendgrid-subusers-v3/list-subuser":{"get":{"operationId":"communication_sendgrid_subusers_v3_list_subuser","summary":"List all Subusers","description":"GET /v3/subusers","tags":["communication"],"parameters":[{"name":"username","in":"query","required":false,"description":"The username of this subuser.","schema":{"type":"string","description":"The username of this subuser."}},{"name":"limit","in":"query","required":false,"description":"`limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default…","schema":{"type":"integer","description":"`limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default…"}},{"name":"region","in":"query","required":false,"description":"Filter for Subusers in this region. If not provided, all Subusers will be returned. All users can also be explicitly requested by using…","schema":{"type":"string","enum":["all","global","eu"],"description":"Filter for Subusers in this region. If not provided, all Subusers will be returned. All users can also be explicitly requested by using…"}},{"name":"include_region","in":"query","required":false,"description":"Optional flag to include the regions of the Subusers in the response. If not provided, the region will be omitted from the response.","schema":{"type":"boolean","default":false,"description":"Optional flag to include the regions of the Subusers in the response. If not provided, the region will be omitted from the response."}},{"name":"offset","in":"query","required":false,"description":"The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0`…","schema":{"type":"integer","default":0,"description":"The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0`…"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/create-subuser":{"post":{"operationId":"communication_sendgrid_subusers_v3_create_subuser","summary":"Create Subuser","description":"POST /v3/subusers","tags":["communication"],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/update-subuser":{"post":{"operationId":"communication_sendgrid_subusers_v3_update_subuser","summary":"Enable/disable a subuser","description":"PATCH /v3/subusers/{subuser_name}","tags":["communication"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subuser_name"],"properties":{"subuser_name":{"type":"string","description":"The username of the Subuser."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/delete-subuser":{"post":{"operationId":"communication_sendgrid_subusers_v3_delete_subuser","summary":"Delete a subuser","description":"DELETE /v3/subusers/{subuser_name}","tags":["communication"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subuser_name"],"properties":{"subuser_name":{"type":"string","description":"The username of the Subuser."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/update-subuser-website-access":{"post":{"operationId":"communication_sendgrid_subusers_v3_update_subuser_website_access","summary":"Enable/Disable website access for a Subuser","description":"PATCH /v3/subusers/{subuser_name}/website_access","tags":["communication"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subuser_name"],"properties":{"subuser_name":{"type":"string"},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/get-subuser-credit":{"get":{"operationId":"communication_sendgrid_subusers_v3_get_subuser_credit","summary":"Get the Credits for a Subuser","description":"GET /v3/subusers/{subuser_name}/credits","tags":["communication"],"parameters":[{"name":"subuser_name","in":"query","required":true,"description":"The username of the Subuser.","schema":{"type":"string","description":"The username of the Subuser."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/update-subuser-credit":{"post":{"operationId":"communication_sendgrid_subusers_v3_update_subuser_credit","summary":"Update the Credits for a Subuser","description":"PUT /v3/subusers/{subuser_name}/credits","tags":["communication"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subuser_name","body"],"properties":{"subuser_name":{"type":"string","description":"The username of the Subuser."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/update-subuser-remaining-credit":{"post":{"operationId":"communication_sendgrid_subusers_v3_update_subuser_remaining_credit","summary":"Update the remaining credits for a Subuser","description":"PATCH /v3/subusers/{subuser_name}/credits/remaining","tags":["communication"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subuser_name","body"],"properties":{"subuser_name":{"type":"string","description":"The username of the Subuser."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/update-subuser-ip":{"post":{"operationId":"communication_sendgrid_subusers_v3_update_subuser_ip","summary":"Update IPs assigned to a subuser","description":"PUT /v3/subusers/{subuser_name}/ips","tags":["communication"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subuser_name"],"properties":{"subuser_name":{"type":"string","description":"The username of the Subuser."},"body":{"type":"object","description":"JSON request body"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":0,"x-apizie-min-plan":null,"x-apizie-bulk":false,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/list-subuser-monthly-stat":{"get":{"operationId":"communication_sendgrid_subusers_v3_list_subuser_monthly_stat","summary":"Retrieve the monthly email statistics for a single subuser","description":"GET /v3/subusers/{subuser_name}/stats/monthly","tags":["communication"],"parameters":[{"name":"subuser_name","in":"query","required":true,"description":"The username of the Subuser.","schema":{"type":"string","description":"The username of the Subuser."}},{"name":"date","in":"query","required":true,"description":"The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD","schema":{"type":"string","description":"The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD"}},{"name":"sort_by_metric","in":"query","required":false,"description":"The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`,…","schema":{"type":"string","default":"delivered","description":"The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`,…"}},{"name":"sort_by_direction","in":"query","required":false,"description":"The direction you want to sort.","schema":{"type":"string","enum":["desc","asc"],"description":"The direction you want to sort."}},{"name":"limit","in":"query","required":false,"description":"Optional field to limit the number of results returned.","schema":{"type":"integer","default":5,"description":"Optional field to limit the number of results returned."}},{"name":"offset","in":"query","required":false,"description":"Optional beginning point in the list to retrieve from.","schema":{"type":"integer","default":0,"description":"Optional beginning point in the list to retrieve from."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/list-reputation":{"get":{"operationId":"communication_sendgrid_subusers_v3_list_reputation","summary":"Retrieve Subuser Reputations","description":"GET /v3/subusers/reputations","tags":["communication"],"parameters":[{"name":"usernames","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/list-stat":{"get":{"operationId":"communication_sendgrid_subusers_v3_list_stat","summary":"Retrieve email statistics for your subusers.","description":"GET /v3/subusers/stats","tags":["communication"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Limits the number of results returned per page.","schema":{"type":"integer","description":"Limits the number of results returned per page."}},{"name":"offset","in":"query","required":false,"description":"The point in the list to begin retrieving results from.","schema":{"type":"integer","description":"The point in the list to begin retrieving results from."}},{"name":"aggregated_by","in":"query","required":false,"description":"How to group the statistics. Must be either \"day\", \"week\", or \"month\".","schema":{"type":"string","enum":["day","week","month"],"description":"How to group the statistics. Must be either \"day\", \"week\", or \"month\"."}},{"name":"subusers","in":"query","required":true,"description":"The subuser you want to retrieve statistics for. You may include this parameter up to 10 times to retrieve statistics for multiple subusers.","schema":{"type":"string","description":"The subuser you want to retrieve statistics for. You may include this parameter up to 10 times to retrieve statistics for multiple subusers."}},{"name":"start_date","in":"query","required":true,"description":"The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.","schema":{"type":"string","description":"The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD."}},{"name":"end_date","in":"query","required":false,"description":"The end date of the statistics to retrieve. Defaults to today.","schema":{"type":"string","description":"The end date of the statistics to retrieve. Defaults to today."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/list-monthly-stat":{"get":{"operationId":"communication_sendgrid_subusers_v3_list_monthly_stat","summary":"Retrieve monthly stats for all subusers","description":"GET /v3/subusers/stats/monthly","tags":["communication"],"parameters":[{"name":"date","in":"query","required":true,"description":"The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD","schema":{"type":"string","description":"The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD"}},{"name":"subuser","in":"query","required":false,"description":"A substring search of your subusers.","schema":{"type":"string","description":"A substring search of your subusers."}},{"name":"sort_by_metric","in":"query","required":false,"description":"The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`,…","schema":{"type":"string","enum":["blocks","bounces","clicks","delivered","opens","requests","unique_clicks","unique_opens","unsubscribes"],"description":"The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`,…"}},{"name":"sort_by_direction","in":"query","required":false,"description":"The direction you want to sort.","schema":{"type":"string","enum":["desc","asc"],"description":"The direction you want to sort."}},{"name":"limit","in":"query","required":false,"description":"Optional field to limit the number of results returned.","schema":{"type":"integer","default":5,"description":"Optional field to limit the number of results returned."}},{"name":"offset","in":"query","required":false,"description":"Optional beginning point in the list to retrieve from.","schema":{"type":"integer","default":0,"description":"Optional beginning point in the list to retrieve from."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/communication:sendgrid-subusers-v3/list-stat-sum":{"get":{"operationId":"communication_sendgrid_subusers_v3_list_stat_sum","summary":"Retrieve the totals for each email statistic metric for all subusers.","description":"GET /v3/subusers/stats/sums","tags":["communication"],"parameters":[{"name":"sort_by_direction","in":"query","required":false,"description":"The direction you want to sort.","schema":{"type":"string","enum":["desc","asc"],"description":"The direction you want to sort."}},{"name":"start_date","in":"query","required":true,"description":"The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.","schema":{"type":"string","description":"The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD."}},{"name":"end_date","in":"query","required":false,"description":"The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.","schema":{"type":"string","description":"The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD."}},{"name":"limit","in":"query","required":false,"description":"Limits the number of results returned per page.","schema":{"type":"integer","default":5,"description":"Limits the number of results returned per page."}},{"name":"offset","in":"query","required":false,"description":"The point in the list to begin retrieving results from.","schema":{"type":"integer","default":0,"description":"The point in the list to begin retrieving results from."}},{"name":"aggregated_by","in":"query","required":false,"description":"How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD.","schema":{"type":"string","description":"How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD."}},{"name":"sort_by_metric","in":"query","required":false,"description":"The metric that you want to sort by. Must be a single metric.","schema":{"type":"string","default":"delivered","description":"The metric that you want to sort by. Must be a single metric."}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"RunEnvelope":{"type":"object","required":["project","data","timestamp"],"properties":{"project":{"type":"string","example":"dev-tools:hash"},"data":{},"timestamp":{"type":"string","format":"date-time"}}},"ErrorEnvelope":{"type":"object","properties":{"content":{},"message":{"type":"string"},"errors":{"type":"array","items":{}},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}},"responses":{"Error":{"description":"Invalid key, plan gate, rate limit or upstream failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}