---
updatedAt: 2025-11-12T22:18:36.000Z
agentTools:
  projectIndex: https://docs.nmp.arianee.com/llms.txt
---

# Send Once-Off Message Campaign

This endpoint allows you to send a once-off message campaign draft previously created.

- URL: `POST - {{url}}/onceOfMessage/:id/createMessage`
    
- Parameter: `id` - ID of the campaign.
    
- Success: The campaign data are returned.
    

[For more information, read our detailed API documentation.](https://docs.nmp.arianee.com/docs/once-off-message-campaign)

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "🎨 Digital Passports Utilities",
    "contact": {},
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{url}",
      "variables": {
        "url": {
          "default": "nmp_endpoint"
        }
      }
    }
  ],
  "paths": {
    "/onceOfMessage/{id}/createMessage": {
      "post": {
        "tags": [
          "Once-Off Message Campaign"
        ],
        "summary": "Send Once-Off Message Campaign",
        "description": "This endpoint allows you to send a once-off message campaign draft previously created.\n\n- URL: `POST - {{url}}/onceOfMessage/:id/createMessage`\n    \n- Parameter: `id` - ID of the campaign.\n    \n- Success: The campaign data are returned.\n    \n\n[For more information, read our detailed API documentation.](https://docs.nmp.arianee.com/docs/once-off-message-campaign)",
        "operationId": "SendOnce-OffMessageCampaign",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the campaign",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "string",
              "example": "641436fc334534f2ee7907aa"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Powered-By": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Express"
                  }
                }
              },
              "Access-Control-Allow-Origin": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "*"
                  }
                }
              },
              "Content-Length": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "237"
                  }
                }
              },
              "ETag": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "W/\"ed-GCJvdEa/WW2yV4LyCUaFePEi+LU\""
                  }
                }
              },
              "Vary": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Accept-Encoding"
                  }
                }
              },
              "Date": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Fri, 06 Jan 2023 09:51:32 GMT"
                  }
                }
              },
              "Connection": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "keep-alive"
                  }
                }
              },
              "Keep-Alive": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "timeout=5"
                  }
                }
              }
            },
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Success21"
                    },
                    {
                      "example": {
                        "ok": 1,
                        "writeErrors": [],
                        "writeConcernErrors": [],
                        "insertedIds": [
                          {
                            "index": 0,
                            "_id": "63b7ef24ec133a4fe78e7398"
                          }
                        ],
                        "nInserted": 1,
                        "nUpserted": 0,
                        "nMatched": 0,
                        "nModified": 0,
                        "nRemoved": 0,
                        "upserted": [],
                        "lastOp": {
                          "ts": "7185474668390776833",
                          "t": 46
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "ok": 1,
                  "writeErrors": [],
                  "writeConcernErrors": [],
                  "insertedIds": [
                    {
                      "index": 0,
                      "_id": "63b7ef24ec133a4fe78e7398"
                    }
                  ],
                  "nInserted": 1,
                  "nUpserted": 0,
                  "nMatched": 0,
                  "nModified": 0,
                  "nRemoved": 0,
                  "upserted": [],
                  "lastOp": {
                    "ts": "7185474668390776833",
                    "t": 46
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "Date": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Thu, 16 Mar 2023 10:48:19 GMT"
                  }
                }
              },
              "Content-Length": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "163"
                  }
                }
              },
              "Connection": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "keep-alive"
                  }
                }
              },
              "X-Powered-By": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Express"
                  }
                }
              },
              "Access-Control-Allow-Origin": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "*"
                  }
                }
              },
              "ETag": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "W/\"a3-SlsZVhoxHujhBk/UBur2KPI9asc\""
                  }
                }
              },
              "Vary": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Accept-Encoding"
                  }
                }
              },
              "Strict-Transport-Security": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "max-age=15724800; includeSubDomains"
                  }
                }
              }
            },
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorYourcampaignIDhasalreadybeensent1"
                    },
                    {
                      "example": {
                        "name": "API Error",
                        "description": "This message 63b7ef1cec133a4fe78e7397 has already been created",
                        "code": "nmp.back.onceOff.campaignAlreadyCreated",
                        "httpCode": 400
                      }
                    }
                  ]
                },
                "example": {
                  "name": "API Error",
                  "description": "This message 63b7ef1cec133a4fe78e7397 has already been created",
                  "code": "nmp.back.onceOff.campaignAlreadyCreated",
                  "httpCode": 400
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "Date": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Fri, 17 Mar 2023 09:59:58 GMT"
                  }
                }
              },
              "Content-Length": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "229"
                  }
                }
              },
              "Connection": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "keep-alive"
                  }
                }
              },
              "X-Powered-By": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Express"
                  }
                }
              },
              "Access-Control-Allow-Origin": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "*"
                  }
                }
              },
              "ETag": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "W/\"e5-GCYpvEyCXbZKhlrYI2m0oV9Ujtc\""
                  }
                }
              },
              "Vary": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Accept-Encoding"
                  }
                }
              },
              "Strict-Transport-Security": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "max-age=15724800; includeSubDomains"
                  }
                }
              }
            },
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorYourcampaignIDmaynotexist1"
                    },
                    {
                      "example": {
                        "sentryLink": "https://sentry.io/organizations/arianee/issues/?project=5375493&query=id:ee2e0719a4de4585b120be9e523ef55e&statsPeriod=1h",
                        "message": "An unexpected error occured. To help fixing this bug, please send us sentryLink"
                      }
                    }
                  ]
                },
                "example": {
                  "sentryLink": "https://sentry.io/organizations/arianee/issues/?project=5375493&query=id:ee2e0719a4de4585b120be9e523ef55e&statsPeriod=1h",
                  "message": "An unexpected error occured. To help fixing this bug, please send us sentryLink"
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Success21": {
        "title": "Success21",
        "required": [
          "ok",
          "writeErrors",
          "writeConcernErrors",
          "insertedIds",
          "nInserted",
          "nUpserted",
          "nMatched",
          "nModified",
          "nRemoved",
          "upserted",
          "lastOp"
        ],
        "type": "object",
        "properties": {
          "ok": {
            "type": "integer",
            "format": "int32"
          },
          "writeErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": ""
          },
          "writeConcernErrors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": ""
          },
          "insertedIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsertedId"
            },
            "description": ""
          },
          "nInserted": {
            "type": "integer",
            "format": "int32"
          },
          "nUpserted": {
            "type": "integer",
            "format": "int32"
          },
          "nMatched": {
            "type": "integer",
            "format": "int32"
          },
          "nModified": {
            "type": "integer",
            "format": "int32"
          },
          "nRemoved": {
            "type": "integer",
            "format": "int32"
          },
          "upserted": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": ""
          },
          "lastOp": {
            "$ref": "#/components/schemas/LastOp"
          }
        },
        "example": {
          "ok": 1,
          "writeErrors": [],
          "writeConcernErrors": [],
          "insertedIds": [
            {
              "index": 0,
              "_id": "63b7ef24ec133a4fe78e7398"
            }
          ],
          "nInserted": 1,
          "nUpserted": 0,
          "nMatched": 0,
          "nModified": 0,
          "nRemoved": 0,
          "upserted": [],
          "lastOp": {
            "ts": "7185474668390776833",
            "t": 46
          }
        }
      },
      "InsertedId": {
        "title": "InsertedId",
        "required": [
          "index",
          "_id"
        ],
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "format": "int32"
          },
          "_id": {
            "type": "string"
          }
        },
        "example": {
          "index": 0,
          "_id": "63b7ef24ec133a4fe78e7398"
        }
      },
      "LastOp": {
        "title": "LastOp",
        "required": [
          "ts",
          "t"
        ],
        "type": "object",
        "properties": {
          "ts": {
            "type": "string"
          },
          "t": {
            "type": "integer",
            "format": "int32"
          }
        },
        "example": {
          "ts": "7185474668390776833",
          "t": 46
        }
      },
      "ErrorYourcampaignIDhasalreadybeensent1": {
        "title": "ErrorYourcampaignIDhasalreadybeensent1",
        "required": [
          "name",
          "description",
          "code",
          "httpCode"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "httpCode": {
            "type": "integer",
            "format": "int32"
          }
        },
        "example": {
          "name": "API Error",
          "description": "This message 63b7ef1cec133a4fe78e7397 has already been created",
          "code": "nmp.back.onceOff.campaignAlreadyCreated",
          "httpCode": 400
        }
      },
      "ErrorYourcampaignIDmaynotexist1": {
        "title": "ErrorYourcampaignIDmaynotexist1",
        "required": [
          "sentryLink",
          "message"
        ],
        "type": "object",
        "properties": {
          "sentryLink": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "example": {
          "sentryLink": "https://sentry.io/organizations/arianee/issues/?project=5375493&query=id:ee2e0719a4de4585b120be9e523ef55e&statsPeriod=1h",
          "message": "An unexpected error occured. To help fixing this bug, please send us sentryLink"
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "security": [],
  "tags": [
    {
      "name": "Once-Off Message Campaign"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```