---
updatedAt: 2025-06-09T22:27:38.000Z
agentTools:
  projectIndex: https://docs.connio.com/llms.txt
---

# Create method

## Api Key Authorization

| Required Fields | Values                                         |
| :-------------- | :--------------------------------------------- |
| Context type    | `Account`                                      |
| Scopes          | `appprofile:modify`, or `deviceprofile:modify` |

> 📘 Tip
>
> Alternatively you can create methods as follows:
>
> `POST .../deviceprofiles/{ref}/methods`\
> `POST .../appprofiles/{ref}/methods`

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "admin-services-api",
    "version": "3"
  },
  "servers": [
    {
      "url": "https://api.connio.cloud/v3"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/methods": {
      "post": {
        "summary": "Create method",
        "description": "",
        "operationId": "create-method",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "ownerId",
                  "access"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Profile wide unique, URL friendly name of the method."
                  },
                  "friendlyName": {
                    "type": "string",
                    "description": "Human friendly name of the method for display purposes."
                  },
                  "ownerId": {
                    "type": "string",
                    "description": "Id of the profile that the new method will be added to."
                  },
                  "access": {
                    "type": "string",
                    "description": "Access designator of the method. Can be `private`, `protected` and `public`."
                  },
                  "description": {
                    "type": "string",
                    "description": "Description, notes, etc..."
                  },
                  "tags": {
                    "type": "array",
                    "description": "The list of the tags associated with the method.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "methodImpl": {
                    "type": "object",
                    "description": "Method implementation.",
                    "properties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"id\": \"_mtd_935196559560581731\",\n    \"accountId\": \"_acc_924329848168362343\",\n    \"ownerId\": \"_dpf_935003384677437527\",\n    \"name\": \"getOperationStatus\",\n    \"friendlyName\": \"getOperationStatus\",\n    \"inherited\": false,\n    \"qualifiedName\": \"keiffel$getoperationstatus\",\n    \"access\": \"public\",\n    \"methodImpl\": {        \n        \"funcBody\": \"done(null, value);\",\n        \"script\": \"javascript\"\n    },\n    \"locked\": false,\n    \"dateCreated\": \"2017-07-14T07:48:37.455Z\",\n    \"dateModified\": \"2017-07-14T07:48:37.455Z\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "_mtd_935196559560581731"
                    },
                    "accountId": {
                      "type": "string",
                      "example": "_acc_924329848168362343"
                    },
                    "ownerId": {
                      "type": "string",
                      "example": "_dpf_935003384677437527"
                    },
                    "name": {
                      "type": "string",
                      "example": "getOperationStatus"
                    },
                    "friendlyName": {
                      "type": "string",
                      "example": "getOperationStatus"
                    },
                    "inherited": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "qualifiedName": {
                      "type": "string",
                      "example": "keiffel$getoperationstatus"
                    },
                    "access": {
                      "type": "string",
                      "example": "public"
                    },
                    "methodImpl": {
                      "type": "object",
                      "properties": {
                        "funcBody": {
                          "type": "string",
                          "example": "done(null, value);"
                        },
                        "script": {
                          "type": "string",
                          "example": "javascript"
                        }
                      }
                    },
                    "locked": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "dateCreated": {
                      "type": "string",
                      "example": "2017-07-14T07:48:37.455Z"
                    },
                    "dateModified": {
                      "type": "string",
                      "example": "2017-07-14T07:48:37.455Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```