syntax = "proto3";

package reddit.devvit.post.v1;

import "reddit/devvit/common/v1/error_message.proto";
import "reddit/devvit/post/v1/post.proto";

option go_package = "github.snooguts.net/reddit/devplatform-api/go/grpc/devvit/post/v1;post";

message CreatePromotedDevvitPostRequest {
  // Base post creation request - contains all standard fields
  CreateDevvitPostRequest base_request = 1;
  AdPostMetadata ad_post_metadata = 2;
  // Whether the post is locked by default
  bool is_locked = 3;
}

message AdPostMetadata {
  // Display url of the call to action bar
  string display_url = 1;
  // The destination that the call to action button leads to
  string destination_url = 2;
  // Call to action button text
  string call_to_action = 3;
}

message CreatePromotedDevvitPostResponse {
  // The t3_ id of the created Post
  string id = 1;
  // Error message if an error occurred while creating the Promoted Post
  reddit.devvit.common.v1.ErrorMessage error = 2;
}
