---
updatedAt: 2025-06-11T20:49:21.000Z
agentTools:
  projectIndex: https://docs.acefone.co.uk/llms.txt
---

# Create a Time Group

This API allows you to create a new Time Group.

### Sample Request

```java
curl --request POST \
     --url https://api-account-uk.acefone.com/v1/timegroup \
     --header 'accept: application/json' \
     --header 'content-type: application/json'
```

📘 Important!

> Before we begin, note that the \* sign denotes the mandatory variables in each table.

### Request Variables (Body Params)

The following parameter is required to create a Time Group:

| **Variable Name** | **Description**                                           | **Data Type**    |
| ----------------- | --------------------------------------------------------- | ---------------- |
| name              | Name of the time group.                                   | String           |
| from\_time        | Start time of the time group.                             | Array of Strings |
| to\_time          | End time of the time group.                               | Array of Strings |
| days              | Days on which time group is applicable.                   | String           |
| dates             | Dates on which time group is applicable. Min:1 & Max: 31. | Array of Strings |
| months            | Months on which time group is applicable.                 | Array of Strings |

### Response Variables

The response returned is as following:

| **Variable Name** | **Description**                                                                                                                                                       | **Data Type** |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| Success           | The request success status, the possible values are: **True** (default) for success. **False** for failure.                                                           | Boolean       |
| Message           | The message corresponding to the success status. For example, in **400** Response where the "success" variable pops as **True**, the message displayed is shown here. | String        |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "acefone-uk-base-api-config",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api-account-uk.acefone.com"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/v1/timegroup": {
      "post": {
        "summary": "Create a Time Group",
        "description": "This API allows you to create a new Time Group.",
        "operationId": "create-a-time-group",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name for the timegroup"
                  },
                  "from_time": {
                    "type": "array",
                    "description": "Start time of timegroup",
                    "items": {
                      "type": "string"
                    }
                  },
                  "to_time": {
                    "type": "array",
                    "description": "End time of timegroup",
                    "items": {
                      "type": "string"
                    }
                  },
                  "days": {
                    "type": "string",
                    "description": "Days on which timegroup is applicable.",
                    "enum": [
                      "mon",
                      "tue",
                      "wed",
                      "thu",
                      "fri",
                      "sat",
                      "sun"
                    ]
                  },
                  "dates": {
                    "type": "array",
                    "description": "Dates on which timegroup is applicable, min:1, max:31",
                    "items": {
                      "type": "string"
                    }
                  },
                  "months": {
                    "type": "array",
                    "description": "Months on which timegroup is applicable.",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```