---
updatedAt: 2025-09-10T21:00:41.000Z
agentTools:
  projectIndex: https://shipcars.readme.io/llms.txt
---

# /companies/{id}/set_email_notifications/

Sets if the company should receive email notifications per load cancellation / expiration.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "CTMS",
    "description": "Ship.Cars CTMS",
    "contact": {
      "url": "https://ship.cars",
      "email": "support@ship.cars"
    },
    "version": "1.0.0"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "oauth2",
        "flows": {
          "password": {
            "tokenUrl": "https://auth.ship.cars/auth/realms/master/protocol/openid-connect/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://ship.cars/api"
    }
  ],
  "paths": {
    "/companies/{id}/set_email_notifications/": {
      "post": {
        "tags": [
          "Companies"
        ],
        "description": "Sets if the company should receive email notifications per load cancellation / expiration.",
        "operationId": "companies_set_email_notifications",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Authenticates API requests with a valid access token.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique ID of the company.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "terms_of_service"
                ],
                "type": "object",
                "properties": {
                  "terms_of_service": {
                    "type": "string",
                    "description": "Terms of service of the company that are applicable to transactions with other parties."
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "name",
                    "next_invoice_number"
                  ],
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "URL of the company resource.",
                      "format": "uri",
                      "readOnly": true
                    },
                    "id": {
                      "type": "string",
                      "description": "Unique ID of the company.",
                      "readOnly": true
                    },
                    "features": {
                      "uniqueItems": true,
                      "type": "array",
                      "description": "List of Ship.Cars features to which the company has access.",
                      "readOnly": true,
                      "items": {
                        "type": "string",
                        "description": "Individual Ship.Cars features to which the company has access."
                      }
                    },
                    "labels": {
                      "type": "object",
                      "properties": {},
                      "description": "Labels that are set to the company. Each label is represented by a key-value pair.",
                      "readOnly": true,
                      "example": {
                        "verified": true
                      }
                    },
                    "mandatory_tac": {
                      "type": "string",
                      "description": "Terms and conditions that are applicable to all company transactions.",
                      "readOnly": true
                    },
                    "slug": {
                      "maxLength": 128,
                      "pattern": "^[-a-zA-Z0-9_]+$",
                      "type": "string",
                      "description": "Unique slug of the company resource.",
                      "format": "slug"
                    },
                    "name": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Full name of the company."
                    },
                    "is_shipper": {
                      "type": "boolean",
                      "description": "Indicates whether this is a shipper company."
                    },
                    "is_carrier": {
                      "type": "boolean",
                      "description": "Indicates whether this is a carrier company."
                    },
                    "is_single_owner_operator": {
                      "type": "boolean",
                      "description": "Indicates whether this is an owner-operator carrier company."
                    },
                    "dot_number": {
                      "maximum": 2147483647,
                      "minimum": 0,
                      "type": "integer",
                      "description": "USDOT number of the company."
                    },
                    "mc_number": {
                      "maximum": 2147483647,
                      "minimum": 0,
                      "type": "integer",
                      "description": "MC number of the company."
                    },
                    "address": {
                      "maxLength": 1024,
                      "type": "string",
                      "description": "Street name and number from the company address."
                    },
                    "city": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "City name from the company address."
                    },
                    "state": {
                      "type": "string",
                      "description": "Abbreviation of the state from the company address.",
                      "enum": [
                        "AL",
                        "AK",
                        "AS",
                        "AZ",
                        "AR",
                        "AA",
                        "AE",
                        "AP",
                        "CA",
                        "CO",
                        "CT",
                        "DE",
                        "DC",
                        "FL",
                        "GA",
                        "GU",
                        "HI",
                        "ID",
                        "IL",
                        "IN",
                        "IA",
                        "KS",
                        "KY",
                        "LA",
                        "ME",
                        "MD",
                        "MA",
                        "MI",
                        "MN",
                        "MS",
                        "MO",
                        "MT",
                        "NE",
                        "NV",
                        "NH",
                        "NJ",
                        "NM",
                        "NY",
                        "NC",
                        "ND",
                        "MP",
                        "OH",
                        "OK",
                        "OR",
                        "PA",
                        "PR",
                        "RI",
                        "SC",
                        "SD",
                        "TN",
                        "TX",
                        "UT",
                        "VT",
                        "VI",
                        "VA",
                        "WA",
                        "WV",
                        "WI",
                        "WY"
                      ]
                    },
                    "zip": {
                      "maxLength": 10,
                      "type": "string",
                      "description": "Zip code from the company address."
                    },
                    "logo": {
                      "type": "string",
                      "description": "URL of the image file with the company logo.",
                      "format": "uri",
                      "readOnly": true
                    },
                    "email": {
                      "maxLength": 254,
                      "type": "string",
                      "description": "Contact email address of the company.",
                      "format": "email"
                    },
                    "phone_1": {
                      "maxLength": 20,
                      "type": "string",
                      "description": "First contact number of the company."
                    },
                    "phone_1_notes": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Additional notes about the first contact number."
                    },
                    "phone_1_type": {
                      "type": "string",
                      "description": "Type of the first contact number.",
                      "enum": [
                        "phone",
                        "fax"
                      ]
                    },
                    "phone_2": {
                      "maxLength": 20,
                      "type": "string",
                      "description": "Second contact number of the company."
                    },
                    "phone_2_notes": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Additional notes about the second contact number."
                    },
                    "phone_2_type": {
                      "type": "string",
                      "description": "Type of the second contact number.",
                      "enum": [
                        "phone",
                        "fax"
                      ]
                    },
                    "phone_3": {
                      "maxLength": 20,
                      "type": "string",
                      "description": "Third contact number of the company."
                    },
                    "phone_3_notes": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Additional notes about the third contact number."
                    },
                    "phone_3_type": {
                      "type": "string",
                      "description": "Type of the third contact number.",
                      "enum": [
                        "phone",
                        "fax"
                      ]
                    },
                    "accounting_email": {
                      "maxLength": 254,
                      "type": "string",
                      "description": "Contact email address for accounting purposes.",
                      "format": "email"
                    },
                    "accounting_phone_1": {
                      "maxLength": 20,
                      "type": "string",
                      "description": "First contact number for accounting purposes."
                    },
                    "accounting_phone_1_notes": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Additional notes about the first contact number for accounting purposes."
                    },
                    "accounting_phone_1_type": {
                      "type": "string",
                      "description": "Type of the first contact number for accounting purposes.",
                      "enum": [
                        "phone",
                        "fax"
                      ]
                    },
                    "accounting_phone_2": {
                      "maxLength": 20,
                      "type": "string",
                      "description": "Second contact number for accounting purposes."
                    },
                    "accounting_phone_2_notes": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Additional notes about the second contact number for accounting purposes."
                    },
                    "accounting_phone_2_type": {
                      "type": "string",
                      "description": "Type of the second contact number for accounting purposes.",
                      "enum": [
                        "phone",
                        "fax"
                      ]
                    },
                    "accounting_phone_3": {
                      "maxLength": 20,
                      "type": "string",
                      "description": "Third contact number for accounting purposes."
                    },
                    "accounting_phone_3_notes": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Additional notes about the third contact number for accounting purposes."
                    },
                    "accounting_phone_3_type": {
                      "type": "string",
                      "description": "Type of the third contact number for accounting purposes.",
                      "enum": [
                        "phone",
                        "fax"
                      ]
                    },
                    "accounting_address": {
                      "maxLength": 1024,
                      "type": "string",
                      "description": "Street name and number from the company address for accounting purposes."
                    },
                    "accounting_city": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "City name from the company address for accounting purposes."
                    },
                    "accounting_state": {
                      "type": "string",
                      "description": "Abbreviation of the state from the company address for accounting purposes.",
                      "enum": [
                        "AL",
                        "AK",
                        "AS",
                        "AZ",
                        "AR",
                        "AA",
                        "AE",
                        "AP",
                        "CA",
                        "CO",
                        "CT",
                        "DE",
                        "DC",
                        "FL",
                        "GA",
                        "GU",
                        "HI",
                        "ID",
                        "IL",
                        "IN",
                        "IA",
                        "KS",
                        "KY",
                        "LA",
                        "ME",
                        "MD",
                        "MA",
                        "MI",
                        "MN",
                        "MS",
                        "MO",
                        "MT",
                        "NE",
                        "NV",
                        "NH",
                        "NJ",
                        "NM",
                        "NY",
                        "NC",
                        "ND",
                        "MP",
                        "OH",
                        "OK",
                        "OR",
                        "PA",
                        "PR",
                        "RI",
                        "SC",
                        "SD",
                        "TN",
                        "TX",
                        "UT",
                        "VT",
                        "VI",
                        "VA",
                        "WA",
                        "WV",
                        "WI",
                        "WY"
                      ]
                    },
                    "accounting_zip": {
                      "maxLength": 10,
                      "type": "string",
                      "description": "Zip code from the company address for accounting purposes."
                    },
                    "terms_of_service": {
                      "type": "string",
                      "description": "Terms of service of the company that are applicable to transactions with other parties.",
                      "readOnly": true
                    },
                    "hide_user_list": {
                      "type": "boolean",
                      "description": "Indicates whether users list should be available for all company employees.",
                      "default": true
                    },
                    "email_notifications_enabled": {
                      "type": "boolean",
                      "description": "Indicates whether the company should receive email notification on the email address on file. Currently applicable only for shippers.",
                      "default": true
                    },
                    "test": {
                      "type": "boolean",
                      "description": "Indicates whether this is a test company."
                    },
                    "create_time": {
                      "type": "string",
                      "description": "Date and time of the original creation of the company resource.",
                      "format": "date-time",
                      "readOnly": true
                    },
                    "update_time": {
                      "type": "string",
                      "description": "Date and time of the latest update of the company resource.",
                      "format": "date-time",
                      "readOnly": true
                    },
                    "internal_link_format": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Format of the internal links for loads from the company's external system in which the placeholder for the load identifier is represented by braces.",
                      "format": "uri"
                    },
                    "invoice_enabled": {
                      "type": "boolean",
                      "description": "Indicates whether the automatic invoice generation is enabled for the company."
                    },
                    "invoice_prefix": {
                      "maxLength": 5,
                      "type": "string",
                      "description": "Prefix that is appended to reference numbers of the invoices generated for the company."
                    },
                    "next_invoice_number": {
                      "maximum": 2147483647,
                      "minimum": 0,
                      "type": "integer",
                      "description": "Reference number of the next invoice generated for the company."
                    },
                    "company_owner": {
                      "type": "string",
                      "description": "URL of the user resource for the company owner.",
                      "format": "uri",
                      "readOnly": true
                    },
                    "company_owner_id": {
                      "type": "string",
                      "description": "ID of the user resource for the company owner.",
                      "readOnly": true
                    }
                  }
                },
                "example": {
                  "company_owner_id": "webd",
                  "company_owner": "https://ship.cars/api/users/webd/",
                  "next_invoice_number": 1,
                  "invoice_prefix": "AZT",
                  "invoice_enabled": true,
                  "internal_link_format": "https://www.aztransport.com/orders/{}",
                  "update_time": "2018-04-27T22:26:45.018Z",
                  "create_time": "2018-01-31T17:52:33.039Z",
                  "test": false,
                  "terms_of_service": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
                  "accounting_zip": "48226",
                  "accounting_state": "MI",
                  "accounting_city": "Detroit",
                  "accounting_address": "2526 Summit Park Avenue",
                  "accounting_phone_2_type": "fax",
                  "accounting_phone_2": "(555) 845-5771",
                  "accounting_phone_1_type": "phone",
                  "accounting_phone_1": "(555) 841-9988",
                  "accounting_email": "accounting@aztransport.com",
                  "phone_3_type": "fax",
                  "phone_3": "(555) 674-2292",
                  "phone_2_type": "phone",
                  "phone_2": "(555) 261-5501",
                  "phone_1_type": "phone",
                  "phone_1": "(555) 917-5933",
                  "email": "contact@aztransport.com",
                  "logo": "https://media.ship.cars/media/aztransport.jpg",
                  "zip": "48226",
                  "state": "MI",
                  "city": "Detroit",
                  "address": "2526 Summit Park Avenue",
                  "dot_number": 9898989,
                  "is_single_owner_operator": false,
                  "is_carrier": false,
                  "is_shipper": true,
                  "name": "A-Z Transport Brokers",
                  "slug": "AZTB",
                  "mandatory_tac": "By agreeing to the Terms and Conditions you agree to accept the use of electronic documentation, including but not limited to Electronic Bill of Lading (EBOL). If you are not the Customer/Shipper, you are also affirming that you have been expressly authorized to agree on the Customer/Shipper's behalf both to the Terms and Conditions and to the use of electronic documentation, including EBOL for this shipment.",
                  "labels": {},
                  "features": [
                    "create_edit_orders",
                    "loadboard"
                  ],
                  "id": "j4y0",
                  "url": "https://ship.cars/api/companies/j4y0/"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                },
                "example": {
                  "detail": "JSON parse error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                },
                "example": {
                  "detail": "Authentication credentials were not provided."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                },
                "example": {
                  "detail": "You do not have permission to perform this action."
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                },
                "example": {
                  "detail": "Not found."
                }
              }
            }
          }
        },
        "x-code-samples": [
          {
            "lang": "cURL",
            "source": "curl --request POST \\\n--url 'https://ship.cars/api/companies/j4y0/set_email_notifications/' \\\n--header 'Authorization: Bearer <<USER_ACCESS_TOKEN>>' \\\n--header 'Content-Type: application/json' \\\n--data '{\"email_notifications_enabled\": true}'\n"
          }
        ],
        "x-codegen-request-body-name": "data",
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```