---
schema_version: "1"
id: 0d9c691429c329c87a97ba5fcd00267e575707971e06ea420ec801564e7f635d
title: HttpPost Annotation
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/apex_classes_annotation_http_post.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_http_post.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e99109c7288dddc48354840ad4bff78384c1e86d05a6d80cfc6f7bc2a6a86741
---
# HttpPost Annotation

The @HttpPost annotation is used at the method level and enables you to expose an Apex method as a REST resource. This method is called when an HTTP POST request is sent, and creates a new resource.

To use this annotation, your Apex method must be defined as global static.