{
  "service": "postgrid",
  "displayName": "PostGrid",
  "categories": [
    "Communication",
    "Marketing"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "POSTGRID_API_KEY",
      "description": "PostGrid Print & Mail API key sent with the x-api-key request header. Create or copy it from your PostGrid dashboard: https://dashboard.postgrid.com/."
    }
  ],
  "homepageUrl": "https://www.postgrid.com",
  "actions": [
    {
      "id": "postgrid.create_contact",
      "service": "postgrid",
      "name": "create_contact",
      "description": "Create a PostGrid Print & Mail contact using either a person name, company name, or both.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "addressLine1": {
            "type": "string",
            "minLength": 1,
            "description": "The first line of the contact's address.",
            "pattern": "\\S"
          },
          "addressLine2": {
            "type": "string",
            "minLength": 1,
            "description": "The second line of the contact's address.",
            "pattern": "\\S"
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "description": "The city of the contact's address.",
            "pattern": "\\S"
          },
          "provinceOrState": {
            "type": "string",
            "minLength": 1,
            "description": "The state or province of the contact's address.",
            "pattern": "\\S"
          },
          "postalOrZip": {
            "type": "string",
            "minLength": 1,
            "description": "The postal or ZIP code of the contact's address.",
            "pattern": "\\S"
          },
          "countryCode": {
            "type": "string",
            "description": "The ISO 3166-1 alpha-2 country code of the contact's address.",
            "pattern": "^\\s*[A-Za-z]{2}\\s*$"
          },
          "companyName": {
            "type": "string",
            "minLength": 1,
            "description": "The contact company name. Required when firstName is omitted.",
            "pattern": "\\S"
          },
          "firstName": {
            "type": "string",
            "minLength": 1,
            "description": "The contact first name. Required when companyName is omitted.",
            "pattern": "\\S"
          },
          "lastName": {
            "type": "string",
            "minLength": 1,
            "description": "The contact last name.",
            "pattern": "\\S"
          },
          "email": {
            "type": "string",
            "minLength": 1,
            "description": "The contact email address.",
            "pattern": "\\S"
          },
          "phoneNumber": {
            "type": "string",
            "minLength": 1,
            "description": "The contact phone number.",
            "pattern": "\\S"
          },
          "jobTitle": {
            "type": "string",
            "minLength": 1,
            "description": "The contact job title.",
            "pattern": "\\S"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "An optional description visible in PostGrid and the dashboard.",
            "pattern": "\\S"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "description": "A metadata value stored with the PostGrid resource."
            },
            "description": "Metadata key-value pairs stored with the PostGrid resource."
          },
          "skipVerification": {
            "type": "boolean",
            "description": "Whether PostGrid should skip address verification."
          },
          "forceVerifiedStatus": {
            "type": "boolean",
            "description": "Whether PostGrid should force this contact to verified status."
          }
        },
        "additionalProperties": false,
        "required": [
          "addressLine1",
          "countryCode"
        ],
        "description": "The input payload for creating a PostGrid contact.",
        "anyOf": [
          {
            "required": [
              "firstName"
            ]
          },
          {
            "required": [
              "companyName"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true,
        "description": "A PostGrid contact object."
      }
    },
    {
      "id": "postgrid.create_template",
      "service": "postgrid",
      "name": "create_template",
      "description": "Create a PostGrid Print & Mail template with optional HTML, description, and metadata.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "html": {
            "type": "string",
            "minLength": 1,
            "description": "The HTML content of the template.",
            "pattern": "\\S"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "An optional description visible in PostGrid and the dashboard.",
            "pattern": "\\S"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "description": "A metadata value stored with the PostGrid resource."
            },
            "description": "Metadata key-value pairs stored with the PostGrid resource."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for creating a PostGrid template."
      },
      "outputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true,
        "description": "A PostGrid template object."
      }
    },
    {
      "id": "postgrid.delete_contact",
      "service": "postgrid",
      "name": "delete_contact",
      "description": "Delete one PostGrid Print & Mail contact by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "The PostGrid contact ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "description": "The input payload for selecting a PostGrid contact."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "const": "contact",
            "type": "string",
            "description": "The PostGrid object type."
          },
          "id": {
            "type": "string",
            "description": "The deleted PostGrid contact ID."
          },
          "deleted": {
            "const": true,
            "type": "boolean",
            "description": "Whether PostGrid deleted the contact."
          }
        },
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "deleted"
        ],
        "description": "The PostGrid contact delete response."
      }
    },
    {
      "id": "postgrid.delete_template",
      "service": "postgrid",
      "name": "delete_template",
      "description": "Delete one PostGrid Print & Mail template by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "The PostGrid template ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "description": "The input payload for selecting a PostGrid template."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "const": "template",
            "type": "string",
            "description": "The PostGrid object type."
          },
          "id": {
            "type": "string",
            "description": "The deleted PostGrid template ID."
          },
          "deleted": {
            "const": true,
            "type": "boolean",
            "description": "Whether PostGrid deleted the template."
          }
        },
        "additionalProperties": false,
        "required": [
          "object",
          "id",
          "deleted"
        ],
        "description": "The PostGrid template delete response."
      }
    },
    {
      "id": "postgrid.get_contact",
      "service": "postgrid",
      "name": "get_contact",
      "description": "Retrieve one PostGrid Print & Mail contact by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "The PostGrid contact ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "description": "The input payload for selecting a PostGrid contact."
      },
      "outputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true,
        "description": "A PostGrid contact object."
      }
    },
    {
      "id": "postgrid.get_template",
      "service": "postgrid",
      "name": "get_template",
      "description": "Retrieve one PostGrid Print & Mail template by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "The PostGrid template ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "description": "The input payload for selecting a PostGrid template."
      },
      "outputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true,
        "description": "A PostGrid template object."
      }
    },
    {
      "id": "postgrid.list_contacts",
      "service": "postgrid",
      "name": "list_contacts",
      "description": "List PostGrid Print & Mail contacts with optional pagination and search.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "skip": {
            "type": "integer",
            "minimum": 0,
            "description": "The number of resources to skip before returning results."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of resources to return."
          },
          "search": {
            "type": "string",
            "minLength": 1,
            "description": "An unstructured search string or a JSON string representing a PostGrid structured search query.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "Pagination and search options for listing PostGrid resources."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "const": "list",
            "type": "string",
            "description": "The PostGrid list object type."
          },
          "totalCount": {
            "type": "integer",
            "description": "The total number of contacts matching the query."
          },
          "skip": {
            "type": "integer",
            "description": "The number of contacts skipped by PostGrid."
          },
          "limit": {
            "type": "integer",
            "description": "The maximum number of contacts PostGrid returned."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A PostGrid contact object."
            },
            "description": "The contacts returned by PostGrid."
          }
        },
        "additionalProperties": false,
        "required": [
          "object",
          "totalCount",
          "skip",
          "limit",
          "data"
        ],
        "description": "The paginated PostGrid contact list response."
      }
    },
    {
      "id": "postgrid.list_templates",
      "service": "postgrid",
      "name": "list_templates",
      "description": "List PostGrid Print & Mail templates with optional pagination and search.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "skip": {
            "type": "integer",
            "minimum": 0,
            "description": "The number of resources to skip before returning results."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of resources to return."
          },
          "search": {
            "type": "string",
            "minLength": 1,
            "description": "An unstructured search string or a JSON string representing a PostGrid structured search query.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "Pagination and search options for listing PostGrid resources."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "const": "list",
            "type": "string",
            "description": "The PostGrid list object type."
          },
          "totalCount": {
            "type": "integer",
            "description": "The total number of templates matching the query."
          },
          "skip": {
            "type": "integer",
            "description": "The number of templates skipped by PostGrid."
          },
          "limit": {
            "type": "integer",
            "description": "The maximum number of templates PostGrid returned."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A PostGrid template object."
            },
            "description": "The templates returned by PostGrid."
          }
        },
        "additionalProperties": false,
        "required": [
          "object",
          "totalCount",
          "skip",
          "limit",
          "data"
        ],
        "description": "The paginated PostGrid template list response."
      }
    },
    {
      "id": "postgrid.update_template",
      "service": "postgrid",
      "name": "update_template",
      "description": "Update the HTML, description, or metadata of one PostGrid Print & Mail template.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "The PostGrid template ID to update.",
            "pattern": "\\S"
          },
          "html": {
            "type": "string",
            "minLength": 1,
            "description": "The replacement HTML content for the template.",
            "pattern": "\\S"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "The replacement description for the template.",
            "pattern": "\\S"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "description": "A metadata value stored with the PostGrid resource."
            },
            "description": "Metadata key-value pairs stored with the PostGrid resource."
          }
        },
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "description": "The input payload for updating a PostGrid template."
      },
      "outputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true,
        "description": "A PostGrid template object."
      }
    }
  ]
}
