# Delete template DELETE https://api-sandbox.payabli.com/api/Templates/{templateId} Deletes a template by ID. Reference: https://docs.payabli.com/developers/api-reference/templates/delete-boarding-template ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Delete boarding template version: endpoint_templates.DeleteTemplate paths: /Templates/{templateId}: delete: operationId: delete-template summary: Delete boarding template description: 'Deletes a template by ID. ' tags: - - subpackage_templates parameters: - name: templateId in: path description: >- The boarding template ID. Can be found at the end of the boarding template URL in PartnerHub. Example: `https://partner-sandbox.payabli.com/myorganization/boarding/edittemplate/80`. Here, the template ID is `80`. required: true schema: type: number format: double - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_:PayabliApiResponseTemplateId' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} components: schemas: type_:IsSuccess: type: boolean type_:PageIdentifier: type: string type_:Responsecode: type: integer type_:Responsedatanonobject: oneOf: - type: string - type: integer type_:ResponseText: type: string type_:PayabliApiResponseTemplateId: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' pageIdentifier: $ref: '#/components/schemas/type_:PageIdentifier' responseCode: $ref: '#/components/schemas/type_:Responsecode' responseData: $ref: '#/components/schemas/type_:Responsedatanonobject' description: When the operation is successful, contains the template's ID. responseText: $ref: '#/components/schemas/type_:ResponseText' required: - responseText ``` ## SDK Code Examples ```python General success response example for template operations. from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.templates.delete_template( template_id=80.0, ) ``` ```typescript General success response example for template operations. import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.templates.deleteTemplate(80); ``` ```go General success response example for template operations. import ( context "context" option "github.com/payabli/sdk-go/option" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Templates.DeleteTemplate( context.TODO(), 80, ) ``` ```csharp General success response example for template operations. using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Templates.DeleteTemplateAsync(80); ``` ```ruby General success response example for template operations. require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Templates/80") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["requestToken"] = '' response = http.request(request) puts response.read_body ``` ```java General success response example for template operations. HttpResponse response = Unirest.delete("https://api-sandbox.payabli.com/api/Templates/80") .header("requestToken", "") .asString(); ``` ```php General success response example for template operations. request('DELETE', 'https://api-sandbox.payabli.com/api/Templates/80', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift General success response example for template operations. import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Templates/80")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```